make binary! fails
[1/4] from: ryan::christiansen::intellisol::com at: 3-May-2001 13:44
The following operation fails about 50% of the time:
content-length: 20 + load system/options/cgi/content-length
post-data: make string! content-length
read-io system/ports/input post-data content-length
post-data: make binary! post-data
Instead of making post-data binary, it makes post-data 'none
Huh?
Ryan C. Christiansen
Web Developer
Intellisol International
4733 Amber Valley Parkway
Fargo, ND 58104
701-235-3390 ext. 6671
FAX: 701-235-9940
http://www.intellisol.com
Global Leader in People Performance Software
_____________________________________
Confidentiality Notice
This message may contain privileged and confidential information. If you
think, for any reason, that this message may have been addressed to you in
error, you must not disseminate, copy or take any action in reliance on it,
and we would ask you to notify us immediately by return email to
[ryan--christiansen--intellisol--com]
[2/4] from: joel:neely:fedex at: 3-May-2001 14:22
[ryan--christiansen--intellisol--com] wrote:
> The following operation fails about 50% of the time:
>
> content-length: 20 + load system/options/cgi/content-length
> post-data: make string! content-length
> read-io system/ports/input post-data content-length
>
> post-data: make binary! post-data
>
> Instead of making post-data binary, it makes post-data 'none
>
Could you try the following modification:
content-length: 20 + load system/options/cgi/content-length
post-data: make string! content-length
read-io system/ports/input post-data content-length
binary-post-data: make binary! post-data
Then for cases where BINARY-POST-DATA is NONE, look and see what's
currently in POST-DATA .
-jn-
[3/4] from: ryan:christiansen:intellisol at: 3-May-2001 14:47
Actually, I've already debugged this by printing post-data before and after
I use the make binary! statement on post-data. Before I make it binary,
post-data always returns expected contents. After I make it binary, it
sometimes returns none.
Ryan C. Christiansen
Web Developer
Intellisol International
4733 Amber Valley Parkway
Fargo, ND 58104
701-235-3390 ext. 6671
FAX: 701-235-9940
http://www.intellisol.com
Global Leader in People Performance Software
_____________________________________
Confidentiality Notice
This message may contain privileged and confidential information. If you
think, for any reason, that this message may have been addressed to you in
error, you must not disseminate, copy or take any action in reliance on it,
and we would ask you to notify us immediately by return email to
[ryan--christiansen--intellisol--com]
Joel Neely
<[joel--neely--f] To: [rebol-list--rebol--com]
edex.com> cc:
Sent by: Subject: [REBOL] Re: make binary! fails
rebol-bounce@
rebol.com
05/03/2001
02:22 PM
Please
respond to
rebol-list
[ryan--christiansen--intellisol--com] wrote:
> The following operation fails about 50% of the time:
>
> content-length: 20 + load system/options/cgi/content-length
> post-data: make string! content-length
> read-io system/ports/input post-data content-length
>
> post-data: make binary! post-data
>
> Instead of making post-data binary, it makes post-data 'none
>
Could you try the following modification:
content-length: 20 + load system/options/cgi/content-length
post-data: make string! content-length
read-io system/ports/input post-data content-length
binary-post-data: make binary! post-data
Then for cases where BINARY-POST-DATA is NONE, look and see what's
currently in POST-DATA .
-jn-
[4/4] from: ryan:christiansen:intellisol at: 3-May-2001 14:51
If you go to this URL and choose a small image to upload and click on the
submit button, you will see my debugging info
http://www.fargonews.com/test-post2.html
First you will see post-data printed before it is binary. Then you will see
post-data (binary):
and following it will be the post-data variable as a
binary value. It only shows a binary value sometimes, even when you use the
same image. I don't have looped read-io there yet, so use a small image.
Ryan C. Christiansen
Web Developer
Intellisol International
4733 Amber Valley Parkway
Fargo, ND 58104
701-235-3390 ext. 6671
FAX: 701-235-9940
http://www.intellisol.com
Global Leader in People Performance Software
_____________________________________
Confidentiality Notice
This message may contain privileged and confidential information. If you
think, for any reason, that this message may have been addressed to you in
error, you must not disseminate, copy or take any action in reliance on it,
and we would ask you to notify us immediately by return email to
[ryan--christiansen--intellisol--com]
Joel Neely
<[joel--neely--f] To: [rebol-list--rebol--com]
edex.com> cc:
Sent by: Subject: [REBOL] Re: make binary! fails
rebol-bounce@
rebol.com
05/03/2001
02:22 PM
Please
respond to
rebol-list
[ryan--christiansen--intellisol--com] wrote:
> The following operation fails about 50% of the time:
>
> content-length: 20 + load system/options/cgi/content-length
> post-data: make string! content-length
> read-io system/ports/input post-data content-length
>
> post-data: make binary! post-data
>
> Instead of making post-data binary, it makes post-data 'none
>
Could you try the following modification:
content-length: 20 + load system/options/cgi/content-length
post-data: make string! content-length
read-io system/ports/input post-data content-length
binary-post-data: make binary! post-data
Then for cases where BINARY-POST-DATA is NONE, look and see what's
currently in POST-DATA .
-jn-