Skip to content

Commit

Permalink
Fix a bug where we were using names in a string context resulting in …
Browse files Browse the repository at this point in the history
…sending the wrong custom headers back. Fixed the names of the headers to be slightly more meta. Fixes #1305
  • Loading branch information
bharat committed Aug 21, 2010
1 parent b503c44 commit bea5f67
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Gallery3Api/src/org/gallery3/api/GalleryItem.as
Expand Up @@ -194,8 +194,8 @@ package org.gallery3.api {
req.requestHeaders = [
new URLRequestHeader("Accept", "*/*"),
new URLRequestHeader("Cache-Control", "no-cache"),
new URLRequestHeader("X_GALLERY_REQUEST_METHOD", "GET"),
new URLRequestHeader("X_GALLERY_REQUEST_KEY", GalleryRestRequest.accessKey)
new URLRequestHeader(GalleryRestRequest::X_GALLERY_REQUEST_METHOD, "GET"),
new URLRequestHeader(GalleryRestRequest::X_GALLERY_REQUEST_KEY, GalleryRestRequest.accessKey)
];
var url:URL = new URL(thumbUrl);
var size:String = url.getParamValue("size");
Expand Down
8 changes: 4 additions & 4 deletions Gallery3Api/src/org/gallery3/api/GalleryRestRequest.as
Expand Up @@ -52,8 +52,8 @@ package org.gallery3.api {
"405": "Method Not Allowed",
"500": "Internal Server Error"
}
private static const X_GALLERY_REQUEST_METHOD: String = "X-Gallery-Request-Method";
private static const X_GALLERY_REQUEST_KEY: String = "X-Gallery-Request-Key";
public static const METHOD_HEADER: String = "X-Gallery-Request-Method";
public static const KEY_HEADER: String = "X-Gallery-Request-Key";
private static const MULTIPART_BOUNDARY: String = "----------196f00b77b968397849367c61a2080";
private static const MULTIPART_MARK: String = "--";
private static const LF: String = "\r\n";
Expand Down Expand Up @@ -200,8 +200,8 @@ package org.gallery3.api {
request.requestHeaders = [
new URLRequestHeader("Accept", "*/*"),
new URLRequestHeader("Cache-Control", "no-cache"),
new URLRequestHeader("X_GALLERY_REQUEST_METHOD", _method),
new URLRequestHeader("X_GALLERY_REQUEST_KEY", _requestAccessKey)
new URLRequestHeader(METHOD_HEADER, _method),
new URLRequestHeader(KEY_HEADER, _requestAccessKey)
];
if (isMultipartData) {
request.data = _buildMultipartBody();
Expand Down

0 comments on commit bea5f67

Please sign in to comment.