masterzen / nginx-upload-progress-module

Nginx module implementing an upload progress system, that monitors RFC1867 POST uploads as they are transmitted to upstream servers.
http://wiki.codemongers.com/NginxHttpUploadProgressModule
Other
432 stars 101 forks source link

JSONP doesn't work #23

Closed Veritasimo closed 12 years ago

Veritasimo commented 12 years ago

The JSONP callback doesn't work. I have tried many combinations of things to try and get it to work (Changing the parameter names, rearranging the parameter order in the URL, compiling with an older changeset, etc.) but none have done the trick.

I have tried nginx 1.0.14 and 0.8.55.

/progress/?X-Progress-ID=12345678901234567890123456789012&callback=jsonp00000000000&_=00000000000

That url, and any combination of parameter ordering, results in the regular JSON output instead of the JSONP output.

Configuration used:

upload_progress prog 10m;

...

        location ^~ /progress {
            report_uploads prog;
        }

...

        location /upload {
                upload_pass   @uploadbackend;
                track_uploads prog 30s;
        }
Veritasimo commented 12 years ago

I missed the upload_progress_jsonp_output directive. I apologise for being a silly head.

drewbuschhorn commented 12 years ago

Hey Veritasimo, I imagine you're cleverer than me and won't get tripped up from the mildly wrong example code for JSONP, but if you're interested I made a small branch / patch to improve a few JSONP related things.

https://github.com/masterzen/nginx-upload-progress-module/pull/17

Hope it helps if you run into trouble.

Drew

masterzen commented 12 years ago

Closing this issue, as it is a configuration issue, not a code issue.