Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: am I losing it with webserv.r?

From: volker::nitsch::gmail::com at: 10-Jun-2005 23:53

On 6/10/05, Eric Haddix <[eric--ehrichweiss--com]> wrote:
> Andreas Bolka wrote: > > using webserv.r 0.0.0.15 which i downloaded just this very moment from > > the script library, it seems that POST's get not handled very well. i > > use a very simple upload.cgi: > > > > REBOL [] > > > > print "Content-type: text/plain^/" > > print "hello world!" > > probe system/options/cgi > > > > and an even simpler upload.html: > > > > <form enctype="multipart/form-data" action="upload.cgi" method==
POST
> > <input type="file" name="nuf" /> > > <input type="submit" /> > > </form> > > > > when i submit something via this form, i see an entry in the log: > > > > 127.0.0.1 - - [10/Jun/2005:1:35:37+2:00] "POST /upload.cgi HTTP/1.1" > > 200 1272 ... > > > > but my browser responds with "this document contains no data". so it > > seems something within webserv.r does not handle POSTs very well. > > sorry, i'm currently in a kind of hurry, so i might have made a very > > trivial mistake here. if not, something very fundamental seems to be > > bugged. > > > > Nope, you're getting exactly what I'm getting and I wish I understood > what the fix was. My scripts work fine with Apache and the like but fail > with webserv. Cal suggested a few ideas but I never could get any of > them to work. Of course if I could understand what he is doing with > system/ports/input and system/ports/output a little better, I might be > able to fix it myself...no luck so far though. > --
Looking in my somewhat patched version: try behind insert tail script-cache reduce [file-path script] this set-modes system/ports/input [lines: false no-wait: false] (or put it in your own script) then use copy/part system/ports/input system/options/cgi/content-length instead of the "official" read-io loop. (AFAIK vanilla does that too) Hope that works -- -Volker Any problem in computer science can be solved with another layer of indirection. But that usually will create another problem. David Wheeler