Last Comment Bug 645945 - JSONP request fails to wrap response when dots are present in the callback key
: JSONP request fails to wrap response when dots are present in the callback key
Status: RESOLVED WONTFIX
:
Product: Webtools
Classification: Server Software
Component: BzAPI (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: Gervase Markham [:gerv]
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-28 21:34 PDT by Daniel Buchner [:dbuc]
Modified: 2014-10-02 02:35 PDT (History)
0 users
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments

Description Daniel Buchner [:dbuc] 2011-03-28 21:34:20 PDT
Please allow JSONP callback function keys to contain dots (.), the service currently fails to wrap the response at all when dots are present. There are many javascript libraries that use callback functions in this format - "JSONP.requests.map.0" - to internally separate different calls as they are returned.
Comment 1 Gervase Markham [:gerv] 2011-03-29 01:54:36 PDT
This is a bug in the Catalyst REST controller: Catalyst/Action/Serialize/JSONP.pm, which uses a "\w" regexp to test for validity, assuming that anything which doesn't match that is invalid.

I have never succeeded in getting my bugfixes applied to this module :-( I may have to fork yet more of it.

But in the mean time, I guess I could hack the copy on api-dev.

Gerv
Comment 2 Daniel Buchner [:dbuc] 2011-03-29 09:34:55 PDT
Do you have an idea of a ballpark ETA? I'm trying to balance the cost benefit of waiting vs developing my own request queue handler script. Best guess is fine :)
Comment 3 Gervase Markham [:gerv] 2011-03-29 09:43:38 PDT
Fixed for api-dev by hacking the module locally.

https://api-dev.bugzilla.mozilla.org/latest/bug?id=620789&content-type=application/javascript&callback=foo.bar

Gerv
Comment 4 Daniel Buchner [:dbuc] 2011-03-29 10:05:57 PDT
Thank you sooooooo much Gerv, this was a huge time saver!
Comment 5 Gervase Markham [:gerv] 2011-07-12 03:50:50 PDT
I'm going to call this FIXED. The upstream module isn't going to change <sigh>, and I'm hoping not to fork more of it. I've documented the limitation.

Gerv
Comment 6 Gervase Markham [:gerv] 2011-07-12 03:58:57 PDT
Actually, no. I may have to fork this module after all.

Gerv
Comment 7 Gervase Markham [:gerv] 2014-10-02 02:35:55 PDT
BzAPI is very much in maintenance mode and is being superseded by the BzAPI shim on top of the native Bugzilla REST API, and that native API itself. So this bug is not going to be fixed.

Gerv

Note You need to log in before you can comment on or make changes to this bug.