Re: [PATCH] add g_web_result_get_header support.

2010-12-30 Thread David Woodhouse
On Tue, 2010-12-28 at 08:59 -0800, Marcel Holtmann wrote: > so what I read here is that in case we find a header a second time, we > need to append its details to the first header we found with that name. > That should be to hard. We don't necessarily need to do that. Semantically, that's how it s

Re: [PATCH] Add g_web_result_get_header support.

2010-12-28 Thread Marcel Holtmann
Hi Mohamed, > Add all http response header to hash table and allow > user to get these header values. > > P.S. > I added multi line support but I really did not test that code, > if you knew a URL that has multi line header please email it to > me so I can test this. > > Header with same key wil

Re: [PATCH] add g_web_result_get_header support.

2010-12-28 Thread Marcel Holtmann
Hi Dave, > > > > And please use g_hash_table_replace() instead of insert. See the GLib > > > > documentation for details or test it by yourself. There is a > > > > different. > > > > > > Hrm. Can't you have repeated headers? If you replace, wouldn't you throw > > > away the previous one when you

Re: [PATCH] add g_web_result_get_header support.

2010-12-28 Thread David Woodhouse
On Sun, 2010-12-26 at 10:42 -0800, Marcel Holtmann wrote: > > > And please use g_hash_table_replace() instead of insert. See the GLib > > > documentation for details or test it by yourself. There is a > > > different. > > > > Hrm. Can't you have repeated headers? If you replace, wouldn't you throw

[PATCH] Add g_web_result_get_header support.

2010-12-27 Thread Mohamed Abbas
Add all http response header to hash table and allow user to get these header values. P.S. I added multi line support but I really did not test that code, if you knew a URL that has multi line header please email it to me so I can test this. Header with same key will be replaced by last header va

Re: [PATCH] add g_web_result_get_header support.

2010-12-26 Thread Marcel Holtmann
Hi Dave, > > So even if we ignore the multi line headers right now, > > Don't. Get it right from the start, please. yes, better get it right from the start. > > And please use g_hash_table_replace() instead of insert. See the GLib > > documentation for details or test it by yourself. There is

Re: [PATCH] add g_web_result_get_header support.

2010-12-26 Thread David Woodhouse
On Tue, 2010-11-02 at 05:41 +0100, Marcel Holtmann wrote: > So even if we ignore the multi line headers right now, Don't. Get it right from the start, please. > And please use g_hash_table_replace() instead of insert. See the GLib > documentation for details or test it by yourself. There is a >

Re: [PATCH] add g_web_result_get_header support.

2010-12-23 Thread Marcel Holtmann
Hi Mohamed, > While we reading header add header to hashtable and > allow user to ask for specific header. > --- > gweb/gweb.c | 36 > gweb/gweb.h |2 ++ > 2 files changed, 38 insertions(+), 0 deletions(-) do we have an updated version of this patch wh

Re: [PATCH] add g_web_result_get_header support.

2010-11-01 Thread Marcel Holtmann
Hi Mohamed, > While we reading header add header to hashtable and > allow user to ask for specific header. > --- > gweb/gweb.c | 36 > gweb/gweb.h |2 ++ > 2 files changed, 38 insertions(+), 0 deletions(-) > > diff --git a/gweb/gweb.c b/gweb/gweb.c > i

[PATCH] add g_web_result_get_header support.

2010-11-01 Thread Mohamed Abbas
While we reading header add header to hashtable and allow user to ask for specific header. --- gweb/gweb.c | 36 gweb/gweb.h |2 ++ 2 files changed, 38 insertions(+), 0 deletions(-) diff --git a/gweb/gweb.c b/gweb/gweb.c index eb31ae9..fbcb173 100644 --