Skip to content

Commit

Permalink
normalized yql response which introduced a *result* into headers, tha…
Browse files Browse the repository at this point in the history
…nks @souders for the catch
  • Loading branch information
marcelduran committed Mar 3, 2013
1 parent d74ed20 commit 1ddc98a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Version 3.1.6
-------------
* Fixed bookmarklet yql response *result* on headers. Thanks @souders

Version 3.1.5
-------------
* Added onerror handler to PhantomJS
Expand Down
6 changes: 6 additions & 0 deletions src/bookmarklet/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ YUI().use(function (iY) {
arrayEach(redir, function (red) {
var headers = {};

// normalize headers, yql introduced result in response
red.headers = red.headers.result || red.headers;

objEach(red.headers, function (value, key) {
headers[key.toLowerCase()] = value;
});
Expand All @@ -242,6 +245,9 @@ YUI().use(function (iY) {
}
comp.href = comp.url = v.url;

// normalize headers, yql introduced result in response
v.headers = v.headers.result || v.headers;

// build raw headers
objEach(v.headers, function (v, k) {
rawHeaders += k + ': ' + v + '\n';
Expand Down

0 comments on commit 1ddc98a

Please sign in to comment.