Yey - glad I could help   =^)

Instead of inBuffer, you may also want to check one of the
other values of the 'state object:

>> A: open tcp://:889  ;just really quick to see the values
>> probe A/state
make object! [
    flags: 4719107
    misc: [224 [] 0]
    tail: 0
    num: 0
    with: "^/"
    custom: none
    index: 0
    func: 6
    fpos: 0
    inBuffer: none
    outBuffer: none
]

Honestly, I have no idea what any of the others are for...
Just inBuffer...

            -Izzy Boy

>
> Ok, I tried your suggestion and I got it to work somewhat but only after
> I decided to start debugging even more...
> I added:
>
>   POSTData: copy conn/state/inBuffer
>
> as you stated and it didn't work so right after it I put
>
>   write/binary %/c/test1 POSTData
>
> to see what it was getting and then for some strange reason vanilla
> started taking the uploads but only sporadically. I really want someone
> to explain why writing the info in POSTData to a file causes it to work.
> I do know that POSTData doesn't contain the actual data but instead the
> http headers, etc. which confuses me even more but I digress.
>
> If I uploaded a file(or even several) and then went to another page,
> coming back to the "vanilla-attach" got me a blank page. I'm still
> working on that one but I'm going to simply see if I can use it with MY
> scripts which will require much less than vanilla does.
>
> If anyone has any insight..I'm all ears...
>
> Eric
>
>
>
> Izkata wrote:
>
>> I use a modified Micro Webserver for all of my experimenting,
>> and have never needed to use CGI, but perhaps this can be of
>> a little help:
>>
>>    http-port: first wait listen-port
>>    Data: copy http-port/state/inBuffer   ;Here's your POST data
>>
>> Looks like this line in your Webserv.r is what you want:
>>    if error? try [ request: parse first (conn: first listen) none ] [ 
>> close
>> conn return ]
>>
>> Add this line after it... I think it's what you want..
>>    POSTData: copy conn/state/inBuffer
>>
>>
>>
>>>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.
>>>-- 
>>>To unsubscribe from the list, just send an email to
>>>lists at rebol.com with unsubscribe as the subject.
>>>
>>>
>>
>>
>>
> -- 
> To unsubscribe from the list, just send an email to
> lists at rebol.com with unsubscribe as the subject.
> 


-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

Reply via email to