tcl-websh-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ronnie Brunner <ronnie.brun...@netcetera.ch>
Subject Re: How can I get POST data?
Date Sat, 21 Apr 2007 10:21:38 GMT
Hi Ulrich

> I need to process POST requests with POST data in a weird format,
> subject to a separate parser. Question is: How can I get hold of the
> *unparsed*, raw POST data as it comes in?
> 
> There is no need to use dispatch, so its formdata parsing is out of
> the way. It wouldn't work anyway, as the incoming mime type is not
> "application/x-www-form-urlencoded" (don't know yet, probably "text/plain").
> The simplest way, [read [web::request -channel]] raises an error.

For me this works:

  [read [web::request -channel] [web::request CONTENT_LENGTH]]

(Note that I tried this within a web::command dispatched using
[web::dispatch -postdata ""] to avoid parsing of the post data by Websh.)

If that doesn't work: what's your specific error?

Regards
Ronnie
-- 
Meet us at Jazoon'07: 24 - 28 June - http://jazoon.com

Ronnie Brunner | ronnie.brunner@netcetera.ch
phone +41 (0)44 247 79 79 | fax +41 (0)44 247 70 75
Netcetera AG | 8040 Z├╝rich | Switzerland | http://netcetera.ch

---------------------------------------------------------------------
To unsubscribe, e-mail: websh-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: websh-dev-help@tcl.apache.org


Mime
View raw message