[Gambas-user] Issue 404 in gambas: [gb.net.curl] Executing Post() with an empty string gives error

gambas at ...2524... gambas at ...2524...
Sun Feb 10 06:56:57 CET 2013


Status: New
Owner: ----
Labels: Version-TRUNK Type-Bug Priority-Medium OpSys-Any Dist-Any Arch-Any  
Desktop-Any GUI-Any

New issue 404 by sebi... at ...626...: [gb.net.curl] Executing Post() with an  
empty string gives error
http://code.google.com/p/gambas/issues/detail?id=404

It should be possible to execute Post() with _Data_ [0] being an empty  
string or Null:
hClient.Post("application/x-www-form-urlencoded",Null , [sHeader])

But instead it complains of "No return value".

Also, if you do:
hClient.Post("application/x-www-form-urlencoded", "", [sHeader])

An "Invalid data" error is raised instead of the previous one.

According the the HTTP specifications [1] the message body may or may not  
be present, and it is signaled by the inclusion of the Content-Length  
header.

[0] http://gambasdoc.org/help/comp/gb.net.curl/httpclient/post?v3

[1] http://tools.ietf.org/html/rfc2616#section-4.3





More information about the User mailing list