On Sat, Jul 16, 2011 at 5:23 AM, Mike Blumenkrantz <m...@zentific.com> wrote:
> On Sat, 16 Jul 2011 01:01:20 -0700
> "Enlightenment SVN" <no-re...@enlightenment.org> wrote:
>
>> Log:
>> clean up ecore-con server example: HTTP requires a seperator (\r\n in this
>> case) following each header line and a double separator between headers and
>> body. additionally, content-length must be EXACTLY the length of the body,
>> and must not include trailing garbage. snprintf use here is incorrect due to
>> inconsistent behavior of snprintf, so we can lazily fall back to strlen since
>> this is just a simple example
>>
>> Author:       discomfitor
>> Date:         2011-07-16 01:01:19 -0700 (Sat, 16 Jul 2011)
>> New Revision: 61421
>> Trac:         http://trac.enlightenment.org/e/changeset/61421
>>
>> Modified:
>>   trunk/ecore/src/examples/ecore_con_server_http_example.c
>>
>> Modified: trunk/ecore/src/examples/ecore_con_server_http_example.c
>> ===================================================================
>> --- trunk/ecore/src/examples/ecore_con_server_http_example.c
>> 2011-07-16 07:38:33 UTC (rev 61420) +++
>> trunk/ecore/src/examples/ecore_con_server_http_example.c      2011-07-16
>> 08:01:19 UTC (rev 61421) @@ -14,11 +14,10 @@ "Server: Ecore_Con custom
>> server\r\n" "Content-Length: %zd\r\n"
>>  "Content-Type: text/html; charset=UTF-8\r\n"
>> -"Set-Cookie: MYCOOKIE=1; path=/; expires=%s"
>> +"Set-Cookie: MYCOOKIE=1; path=/; expires=%s\r\n"
>>  "Set-Cookie: SESSIONCOOKIE=1; path=/\r\n"
> technically using the set-cookie header twice like this is totally invalid
> too, but I ain't no babysitter

Well, I understood that it was valid, considering what I read in
http://curl.haxx.se/rfc/cookie_spec.html

"Additional Notes
Multiple Set-Cookie headers can be issued in a single server response. "

Maybe it's referring to a Set-Cookie with many cookies on it? Doesn't
seem like so to me.

Anyway, I just tried to put some code to demonstrate the
ecore_con_url_cookies API. Didn't mean to make a perfect http server,
and this code is more for demonstration of the ecore API than HTTP
protocol.

-- 
Rafael Antognolli
ProFUSION embedded systems
http://profusion.mobi

------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to