Problem with Post and swfupload
Hi, I'm trying to use swfupload [1] with Nevow to give my users some nice file upload forms. The problem is that although I can do normal GET requests to work, Nevow returns a 302 when I try to do a POST. Looking a bit closer into the logs and testing POSTs with a normal browser (not flash) I see a difference in the logs: 2007/10/05 12:25 +0200 [HTTPChannel,6,127.0.0.1] 127.0.0.1 - - [05/Oct/2007:10:25:31 +0000] "POST /uploadreturn HTTP/1.1" 200 1053 "http://localhost:8000/upload" "Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.6 (like Gecko) (Kubuntu)" 2007/10/05 12:30 +0200 [HTTPChannel,8,127.0.0.1] 127.0.0.1 - - [05/Oct/2007:10:30:53 +0000] "POST /uploadreturn HTTP/1.1" 302 342 "-" "Shockwave Flash\nConnection: Keep-Alive\nCache-Control: no-cache" The only difference in the logs is the "-" vs "http://localhost:8000/upload" in what I think is the referrer field. Does anyone have a suggestion on how this may be fixed / worked around? 1. http://swfupload.mammon.se/ Kind regards, Tarjei
On Fri, 05 Oct 2007 12:34:38 +0200, tarjei <tarjei@nu.no> wrote:
Hi,
I'm trying to use swfupload [1] with Nevow to give my users some nice file upload forms.
The problem is that although I can do normal GET requests to work, Nevow returns a 302 when I try to do a POST.
Looking a bit closer into the logs and testing POSTs with a normal browser (not flash) I see a difference in the logs: 2007/10/05 12:25 +0200 [HTTPChannel,6,127.0.0.1] 127.0.0.1 - - [05/Oct/2007:10:25:31 +0000] "POST /uploadreturn HTTP/1.1" 200 1053 "http://localhost:8000/upload" "Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.6 (like Gecko) (Kubuntu)" 2007/10/05 12:30 +0200 [HTTPChannel,8,127.0.0.1] 127.0.0.1 - - [05/Oct/2007:10:30:53 +0000] "POST /uploadreturn HTTP/1.1" 302 342 "-" "Shockwave Flash\nConnection: Keep-Alive\nCache-Control: no-cache"
The only difference in the logs is the "-" vs "http://localhost:8000/upload" in what I think is the referrer field.
Does anyone have a suggestion on how this may be fixed / worked around?
1. http://swfupload.mammon.se/
Kind regards, Tarjei
Might this be related? http://twistedmatrix.com/trac/ticket/2113 Jean-Paul
Jean-Paul Calderone wrote:
On Fri, 05 Oct 2007 12:34:38 +0200, tarjei <tarjei@nu.no> wrote:
Hi,
I'm trying to use swfupload [1] with Nevow to give my users some nice file upload forms.
The problem is that although I can do normal GET requests to work, Nevow returns a 302 when I try to do a POST.
Looking a bit closer into the logs and testing POSTs with a normal browser (not flash) I see a difference in the logs: 2007/10/05 12:25 +0200 [HTTPChannel,6,127.0.0.1] 127.0.0.1 - - [05/Oct/2007:10:25:31 +0000] "POST /uploadreturn HTTP/1.1" 200 1053 "http://localhost:8000/upload" "Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.6 (like Gecko) (Kubuntu)" 2007/10/05 12:30 +0200 [HTTPChannel,8,127.0.0.1] 127.0.0.1 - - [05/Oct/2007:10:30:53 +0000] "POST /uploadreturn HTTP/1.1" 302 342 "-" "Shockwave Flash\nConnection: Keep-Alive\nCache-Control: no-cache"
The only difference in the logs is the "-" vs "http://localhost:8000/upload" in what I think is the referrer field.
Does anyone have a suggestion on how this may be fixed / worked around?
Might this be related?
http://twistedmatrix.com/trac/ticket/2113 Yep, that seems to be the but :-/
I'll try the patch and report back. Will the patch be included in the next version of Twisted? Regards, Tarjei
Jean-Paul
_______________________________________________ Twisted-web mailing list Twisted-web@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
On Tue, 09 Oct 2007 15:40:48 +0200, tarjei <tarjei@nu.no> wrote:
Jean-Paul Calderone wrote:
On Fri, 05 Oct 2007 12:34:38 +0200, tarjei <tarjei@nu.no> wrote:
Hi,
I'm trying to use swfupload [1] with Nevow to give my users some nice file upload forms.
The problem is that although I can do normal GET requests to work, Nevow returns a 302 when I try to do a POST.
Looking a bit closer into the logs and testing POSTs with a normal browser (not flash) I see a difference in the logs: 2007/10/05 12:25 +0200 [HTTPChannel,6,127.0.0.1] 127.0.0.1 - - [05/Oct/2007:10:25:31 +0000] "POST /uploadreturn HTTP/1.1" 200 1053 "http://localhost:8000/upload" "Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.6 (like Gecko) (Kubuntu)" 2007/10/05 12:30 +0200 [HTTPChannel,8,127.0.0.1] 127.0.0.1 - - [05/Oct/2007:10:30:53 +0000] "POST /uploadreturn HTTP/1.1" 302 342 "-" "Shockwave Flash\nConnection: Keep-Alive\nCache-Control: no-cache"
The only difference in the logs is the "-" vs "http://localhost:8000/upload" in what I think is the referrer field.
Does anyone have a suggestion on how this may be fixed / worked around?
Might this be related?
http://twistedmatrix.com/trac/ticket/2113 Yep, that seems to be the but :-/
I'll try the patch and report back. Will the patch be included in the next version of Twisted?
Only if someone finishes work on that ticket. That work would consist of reviewing the patch and making any necessary corrections and then applying it to trunk. Jean-Paul
Jean-Paul Calderone wrote:
On Tue, 09 Oct 2007 15:40:48 +0200, tarjei <tarjei@nu.no> wrote:
Jean-Paul Calderone wrote:
On Fri, 05 Oct 2007 12:34:38 +0200, tarjei <tarjei@nu.no> wrote:
Hi,
I'm trying to use swfupload [1] with Nevow to give my users some nice file upload forms.
The problem is that although I can do normal GET requests to work, Nevow returns a 302 when I try to do a POST.
Looking a bit closer into the logs and testing POSTs with a normal browser (not flash) I see a difference in the logs: 2007/10/05 12:25 +0200 [HTTPChannel,6,127.0.0.1] 127.0.0.1 - - [05/Oct/2007:10:25:31 +0000] "POST /uploadreturn HTTP/1.1" 200 1053 "http://localhost:8000/upload" "Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.6 (like Gecko) (Kubuntu)" 2007/10/05 12:30 +0200 [HTTPChannel,8,127.0.0.1] 127.0.0.1 - - [05/Oct/2007:10:30:53 +0000] "POST /uploadreturn HTTP/1.1" 302 342 "-" "Shockwave Flash\nConnection: Keep-Alive\nCache-Control: no-cache"
The only difference in the logs is the "-" vs "http://localhost:8000/upload" in what I think is the referrer field.
Does anyone have a suggestion on how this may be fixed / worked around?
Might this be related?
http://twistedmatrix.com/trac/ticket/2113 Yep, that seems to be the but :-/
I'll try the patch and report back. Will the patch be included in the next version of Twisted?
Only if someone finishes work on that ticket. That work would consist of reviewing the patch and making any necessary corrections and then applying it to trunk. Hi, I took another look at the patch and realized it was for web2 not web/nevow that I am using.
If you got a pointer to how this may be fixed when web1 is used that would be great. If anyone has implemented another method for showing file upload progress, I would be grateful for that information as well. Regards, Tarjei
Jean-Paul
_______________________________________________ Twisted-web mailing list Twisted-web@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
participants (2)
-
Jean-Paul Calderone
-
tarjei