Isn't that in web.input? Are people PUTting form data? I guess that
could make sense; file a bug if that's what you're doing.
On Wed, Aug 6, 2008 at 4:23 AM, Yoan Blanc <[EMAIL PROTECTED]> wrote:
>
> I had to do that modification for PUT:
>
> === modified file 'web/webapi.py'
> --- web/webapi.py 2008-06-28 15:43:14 +0000
> +++ web/webapi.py 2008-07-26 21:51:40 +0000
> @@ -170,8 +170,8 @@
> e = ctx.env.copy()
> a = b = {}
>
> - if _method.lower() in ['both', 'post']:
> - if e['REQUEST_METHOD'] == 'POST':
> + if _method.lower() in ['both', 'post', 'put']:
> + if e['REQUEST_METHOD'] in ['POST', 'PUT']:
> if e.get('CONTENT_TYPE', '').lower().startswith('multipart/'):
> # since wsgi.input is directly passed to cgi.FieldStorage,
> # it can not be called multiple times. Saving the FieldStorage
>
> I dunno if it's the right way or if that has already been done elsewhere.
>
> --
> Yoan
>
> On Wed, Aug 6, 2008 at 12:45 AM, paul jobs <[EMAIL PROTECTED]> wrote:
>> what is web.data()
>>
>> On Tue, Aug 5, 2008 at 12:37 PM, chaosmaker <[EMAIL PROTECTED]> wrote:
>>>
>>> I'm sorry again, the web.data works with 3.0.1 too.
>>> Sorry about bother.
>>>
>>> Thanks for the help!
>>>
>>> On Aug 5, 3:42 pm, chaosmaker <[EMAIL PROTECTED]> wrote:
>>> > Sorry about the mistake, but for me using the right one give me the
>>> > same result.
>>> >
>>> > But I have noticed one difference in your output
>>> > Server: CherryPy/3.0.1
>>> > Server: CherryPy/3.1.0 WSGI Server
>>> >
>>> > I think this is the problem, I'm using the web.py from the debian
>>> > package, can this be the problem?
>>> >
>>> > On Aug 5, 3:28 pm, "Gary Bernhardt" <[EMAIL PROTECTED]> wrote:
>>> >
>>> > > On Tue, Aug 5, 2008 at 1:54 PM, chaosmaker <[EMAIL PROTECTED]>
>>> > > wrote:
>>> >
>>> > > > Right but I can send the request body to the CherryPy because it
>>> > > > closes the connection before the client send the request body.
>>> >
>>> > > > For example:
>>> >
>>> > > > [EMAIL PROTECTED]:~/api$ telnet 127.0.0.1 8080
>>> > > > Trying 127.0.0.1...
>>> > > > Connected to 127.0.0.1.
>>> > > > Escape character is '^]'.
>>> > > > PUT /REST/v1/USER/Manage/username HTTP/1.0
>>> > > > Content-lenght: 245
>>> >
>>> > > You misspelled Content-length, which is probably the problem since
>>> > > without it, the server doesn't know how much data to expect.
>>> >
>>> > > > HTTP/1.1 200 OK
>>> > > > Date: Tue, 05 Aug 2008 17:53:18 GMT
>>> > > > Server: CherryPy/3.0.1
>>> >
>>> > > --
>>> > > Garyhttp://blog.extracheese.org
>>>
>>
>>
>> >
>>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---