source: trunk/third/libghttp/ChangeLog @ 15592

Revision 15592, 30.4 KB checked in by ghudson, 24 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r15591, which included commits to RCS files with non-trunk default branches.
Line 
12001-01-17  Robey Pointer  <robey@eazel.com>
2
3        reviewed by: J Shane Culpepper  <pepper@eazel.com>
4
5        * ghttp.c: (ghttp_get_status), (ghttp_flush_response_buffer):
6        * ghttp.h:
7        * http_resp.c: (flush_response_body), (http_resp_flush),
8        (read_body_content_length), (read_body_standard):
9        * http_resp.h:
10
11        Add ghttp_flush_reponse_buffer API call to gnome-http, so that
12        apps who don't want to buffer the entire HTTP response can fetch
13        chunks of it at a time.
14
152000-12-05  Christopher Blizzard  <blizzard@redhat.com>
16
17        * configure.in: Bump version to 1.0.9.
18
192000-12-02 Christopher Blizzard <blizzard@redhat.com>
20
21        * ghttp.h/ghttp.c: New function ghttp_get_header_names() that
22        allows you to get a list of the headers that a server returned
23        with its response.
24
25        * http_hdrs.h/http_hdrs.c: New function http_hdr_get_headers() to
26        support the api in ghttp.c.
27
282000-12-02 Christopher Blizzard <blizzard@redhat.com>
29
30        * http_req.c (http_req_send): Back out the patch from John
31        Trowbridge since it doesn't look right to me and I can't reproduce
32        the problem.  It's a bad thing to blast out a \0 to a http server
33        at the end of ther request headers.  The body just might not make
34        it there.
35
362000-10-31  J Shane Culpepper  <pepper@eazel.com>
37
38        * MAINTAINERS:
39
40        Putting myself in the maintainer list since
41        blizzard has been forwarding all the patches
42        over.
43
44        * http_req.c: (http_req_send): Minor fix that
45        John Trowbridge contributed.
46
472000-10-27  Miguel de Icaza  <miguel@helixcode.com>
48
49        * http_date.c (month_from_string_short): Use strncmp instead of
50        memcmp when comparing strings to avoid reading memory we do not
51        own.  Thanks Purify!
52        (http_date_to_time): ditto.
53
54        * http_uri.c (http_uri_parse): ditto
55
562000-10-01  J Shane Culpepper  <pepper@eazel.com>
57
58        * configure.in:
59        Bumping up minor revision number to 1.0.8
60
612000-10-01  J Shane Culpepper  <pepper@eazel.com>
62
63        * configure.in:
64        Checking in Ben Taylor's Solaris patch for
65        lib configuration.
66
672000-07-11  Robin Slomkowski  <rslomkow@eazel.com>
68
69        * libghttp.spec.in: cleaned up so includes
70
712000-06-10  J Shane Culpepper  <pepper@eazel.com>
72
73        * Makefile.am:
74        * configure.in:
75        * ghttp-config.in:
76        * libghttp.spec.in:
77
78        Removed ghttp-config and replaced it with ghttpConf.sh so that configure
79        information can be queried from gnome-config per Migeul's suggestion.
80
812000-05-19 Ali Abdin <aliabdin@aucegypt.edu>
82
83        * libghttp.spec.in: Added gnet-config to the 'devel' package
84
852000-05-13 J Shane Culpepper <pepper@eazel.com>
86
87        *configure.in : Increased version to 1.0.7.  Added a few rules to create
88        a ghttp-config script for easier usage.
89        *Makefile.am : Added build rules to generate ghttp-config from
90        http-config.in
91        *ghttp-config.in : taken mostly from the gnet-config.in.  Allows
92        applications to query ghttp cflags, version, and libs on the fly
93        instead of hardcoding -lghttp, etc into Makefile.am.
94
952000-04-15 Christopher Blizzard <blizzard@redhat.com>
96
97        * configure.in: Increase to version 1.0.6
98
992000-04-15 Christopher Blizzard   <blizzard@redhat.com>
100
101        * http_resp.c (http_resp_read_headers): Fix bug in cases where
102        servers return a 100 continue with headers.  If the 100 continue
103        contained headers ( as they seem to do with IIS 4.0 ) it would
104        confuse the http response header parser.
105       
1062000-03-03 Christopher Blizzard <blizzard@redhat.com>
107
108        * configure.in: Increase to version 1.0.5
109
1102000-03-03 Christopher Blizzard <blizzard@redhat.com>   
111
112        * ghttp.c (ghttp_set_authinfo, ghttp_set_proxy_authinfo): Patch
113        from Tom Anheyer <tom.anheyer@BerlinOnline.de> to fix memory
114        leaks.
115
1161999-08-20 Elliot Lee <sopwith@redhat.com>
117       
118        * ghttp.h, http_req.h, http_resp.h: Remove comma from after last
119        enum item.
120
1211999-08-19  Kjartan Maraas  <kmaraas@online.no>
122
123        * ghttp.h: Move __cplusplus into a comment to avoid
124        warning: text following `#endif' violates ANSI standard.
125       
1261999-06-05  Christopher Blizzard  <blizzard@redhat.com>
127
128        * http_uri.c (http_uri_destroy): Make sure to set the members to
129        NULL after free() so that no one tries to free() them again.
130
131        * ghttp.c (ghttp_prepare): Check the value of
132        a_request->uri->proto before actually using it in a call to
133        strcmp() in an attempt to prevent dereferencing null pointers.
134
135        * http_uri.c (http_uri_parse): If the parse fails, don't destroy
136        the structure that was passed in becuase http_uri_parse() didn't
137        allocate it.  On a failure, it's up to the caller to destroy it.
138
1391999-05-26  Christopher Blizzard  <blizzard@redhat.com>
140
141        * http_resp.c (http_resp_read_headers): Make sure to free() the
142        old reason phrase if it's already been allocated.
143
1441999-05-25  Christopher Blizzard  <blizzard@redhat.com>
145
146        * configure.in: Bump up the version number.
147
148        * http_req.c (http_req_send): Plug memory leak reported by Dmitry
149        Solodovnick <dima@ukraina.net>.
150
1511999-05-05  Christopher Blizzard  <blizzard@redhat.com>
152
153        * AUTHORS: Add Tue to the authors list.  Fix my email address.
154
155        * configure.in: Bump the version number.
156
157        * ghttp.c (ghttp_set_proxy_authinfo): Impl of function.  See
158        below.
159        (ghttp_request_destroy): Make sure that you clean up proxy auth
160        information.
161
162        * ghttp.h: New function ghttp_set_proxy_authinfo() that will set
163        proxy authentication for a http request.  Patch from Tue
164        Wennerberg <tue@nybro.dk>
165
1661999-03-18  Christopher Blizzard  <blizzard@redhat.com>
167
168        * autogen.sh: Revert to old autogen.sh since we aren't using the
169        macros anymore.
170
171        * Makefile.am: Don't include the macros directory.
172
173        * configure.in: Don't use the GNOME_INIT macro.  Bump version to
174        1.0.2.
175
1761999-03-17  Christopher Blizzard  <blizzard@redhat.com>
177
178        * Makefile.std: update so that an old style makefile will build
179        it.
180
181        * libghttp.spec.in: Fix my email address.  I don't work at that
182        other place anymore.
183
184        * configure.in: Bump to version 1.0.1
185
186        * http_uri.c (http_uri_parse): Only dereference a_uri if it's not
187        null.  Thanks to Heath Martin <martinh@pegasus.cc.ucf.edu> for
188        pointing this out.
189
1901999-03-14  Christopher Blizzard  <blizzard@redhat.com>
191
192        * autogen.sh: Use the autogen.sh that calls the macros/ autogen.
193
194        * configure.in: Change to get to work with a recent copy of the
195        macros.
196
1971999-03-03  Christopher Blizzard  <blizzard@redhat.com>
198
199        * Apply patches from James Henstridge <james@daa.com.au> that
200        allow you to use other protocols over an http proxy.
201
202        * configure.in: Bump to version 1.0.0
203
204        * Makefile.am (libghttp_la_LDFLAGS): Bump to version 1.0.0
205
2061999-01-19  Christopher Blizzard  <blizzard@appliedtheory.com>
207
208        * ghttp.c (ghttp_set_body): allow entity bodies for WebDAV
209        methods, too.  Patch from Joe Orton <jeo101@york.ac.uk>
210
2111999-01-12  Christopher Blizzard  <blizzard@appliedtheory.com>
212
213        * libghttp.spec: up version to 0.99.2
214
215        * configure.in: up version to 0.99.2
216
217        * Makefile.am: up version to 0.99.2
218
219        * ghttp_constants.h: Add c++ safety.
220
221        * ghttp.h: Add c++ safety.
222
2231998-12-16  Christopher Blizzard  <blizzard@appliedtheory.com>
224
225        * configure.in: update to version 0.99
226
227        * libghttp.spec: update to version 0.99
228
229        * Makefile.am: update to version 0.99
230
231        * TODO: update TODO - we support basic auth now.
232
2331998-12-09  Herbert Valerio Riedel  <hvr@hvrlab.ml.org>
234
235        * http_base64.c: added #include <string.h> for strlen proto
236
2371998-12-07  Christopher Blizzard  <blizzard@appliedtheory.com>
238
239        * libghttp.spec: Update to version 0.35 for bugfix.
240
241        * configure.in: Update to version 0.35 for bugfix.
242
243        * Makefile.am (libghttp_la_LDFLAGS): Update to version 0.35 for
244        bugfix.
245
246        * http_trans.c (http_trans_connect): Make sure that you only set
247        the saddr information in the connection structure if you actually
248        reset the host information.  If you do another hostname lookup
249        call from another request object, the hostinfo pointer in the
250        connection object would more than likely be replaced with the host
251        information from the other request object creating some
252        interesting behavior for the second use of the first request
253        object - it would connect to the wrong host.  Fix from Heath
254        Martin <martinh@pegasus.cc.ucf.edu>.
255
2561998-11-23  Christopher Blizzard  <blizzard@appliedtheory.com>
257
258        * ghttp.c (ghttp_prepare): Set the header Authorization not
259        WWW-Authenticate.
260        (ghttp_set_authinfo): Build the authorization string properly.
261       
2621998-11-21  Nuno Ferreira  <nmrf@rnl.ist.utl.pt>
263
264        * Makefile.am (libghttp_la_SOURCES): Removed backslash after the
265        last file.
266
2671998-11-20  Christopher Blizzard  <blizzard@appliedtheory.com>
268
269        * ghttp.c (ghttp_request_destroy): Clear auth information on
270        destroy()
271        (ghttp_prepare): Set auth information if its available.
272        (ghttp_set_authinfo): Build the whole auth header string.
273
274        * ghttp.h: New public function.
275
276        * ghttp.c (ghttp_set_authinfo): New function to add auth info to
277        the request structure.
278
279        * http_base64.c: New support for base64 encoding strings.  Code
280        from Joe Orton <jeo101@york.ac.uk>, cleaned up by me.
281
282        * http_base64.h: New header file for base64 support.
283
284        * Makefile.am: Add http_base64.[ch] to library target.
285
286        * http_req.c (http_req_send): Fix from Robert Richardson
287        <robert.richardson@edgeint.com.au> to fix trailing slash appended
288        to http proxy requests.
289
290        * libghttp.spec: Bump library version to 0.34
291
292        * Makefile.am: Bump library version to 0.34
293
2941998-11-14  Christopher Blizzard  <blizzard@appliedtheory.com>
295
296        * ghttp.c (ghttp_get_body_len): Make this return something sane
297        for a transfer in progress.  It makes its best guess now.
298        (ghttp_get_body): This will return the pointer to the body, even
299        for a transfer in progress.
300
301        * Makefile.am (libghttp_la_LDFLAGS): Bump version to 0.34.
302
303        * configure.in: Bump to version 0.34 - there's just too many bug
304        fixes here not to.
305
306        * ghttp.c (ghttp_clean): Reset the trans buffer, don't delete it
307        entirely.
308        (ghttp_prepare): Make sure that http_req_prepare() is called, no
309        matter what.
310        (ghttp_prepare): Make sure that the req->host is set any time that
311        the req->resource has to be reset.  This generally happens
312        whenever you call ghttp_clean().
313       
314        * http_trans.c (http_trans_conn_destroy): Make sure that the
315        socket is closed before destroying the associated object.
316
317        * ghttp.c (ghttp_set_uri): Fix memory leak here.  Make sure that
318        you destroy the old uri before you create a new one.
319        (ghttp_process): Make sure that the connected flag is set to zero
320        when the socket has been closed by a connection: closed header or
321        some other fun.
322
323        * http_trans.c (http_trans_conn_new): Default to 1K chunks instead
324        of 100 byte chunks.  This should perform a _lot_ better.
325
326        * http_resp.c (http_resp_read_body): Return HTTP_TRANS_DONE for
327        content length of zero.  This is the case for a HEAD request.
328        (read_body_content_length): Make sure that you return
329        HTTP_TRANS_DONE after a full read of the content length.
330        Otherwise, the http state machine wasn't being reset properly.
331
3321998-11-13  Christopher Blizzard  <blizzard@appliedtheory.com>
333
334        * ghttp.c (ghttp_close): Make sure that the connected flag is
335        always reset to 0.
336        (ghttp_clean): Make sure to reset the http state machine.
337
3381998-11-11  Christopher Blizzard  <blizzard@appliedtheory.com>
339
340        * http_resp.c (read_body_standard): Check and see if the last read
341        is greater than zero, not not equal to zero since that doesn't
342        catch a -1.
343
344        * ghttp.c (ghttp_request_new): Don't set the uri based on the
345        environment.  That's a policy decision that belongs in a higher
346        level user agent library.  Applications that depend on this should
347        set it themselves or wait until there's a user agent library
348        available.
349
3501998-11-10  Christopher Blizzard  <blizzard@appliedtheory.com>
351
352        * AUTHORS: Update AUTHORS file.
353
354        * Makefile.am: Update library version number.
355
356        * configure.in: Update library version number.
357
358        * ghttp.c (ghttp_request_new): If the env variable "http_proxy" is
359        set, set the proxy automatically when creating the new request
360        object.
361
362        * http_req.c (http_req_send): Fix buffer overrun where the memet()
363        was running past the length of the allocated buffer in the proxy
364        code.  Fix from Frederic Devernay <devernay@istar.fr>
365
3661998-11-09  Christopher Blizzard  <blizzard@appliedtheory.com>
367
368        * http_req.h: Add cases for WebDAV
369
370        * ghttp.c (ghttp_set_type): Add cases for WebDAV
371
3721998-11-08  Christopher Blizzard  <blizzard@appliedtheory.com>
373
374        * http_req.h: Add WebDAV methods.
375
376        * http_req.c: Add WebDAV methods.
377
378        * http_hdrs.c: Add WebDAV and Cookie headers.
379
380        * ghttp_constants.h: Add WebDAV and Cookie headers.
381
3821998-11-03  Christopher Blizzard  <blizzard@appliedtheory.com>
383
384        * libghttp.spec: Bump version to 0.32.0
385
386        * Makefile.am (libghttp_la_LDFLAGS): Bump version to 0.32.0
387
388        * http_trans.h: Add proxy support.
389
390        * http_trans.c: Add proxy support.
391       
392        * http_req.c: Add proxy support.
393
394        * ghttp.h: Add proxy support.
395
396        * ghttp.c: Add proxy support.
397
3981998-10-31  Justin Maurer  <justin@openprojects.net>
399
400        * having a boring halloween. fixed a spelling error in ghttp.c
401
4021998-09-25  Christopher Blizzard  <blizzard@appliedtheory.com>
403
404        * libghttp.spec: New spec file.
405
406        * Makefile.am: Fixes to get make distcheck working.
407
408        * configure.in: Change to 0.30 version.
409
4101998-08-31  Christopher Blizzard  <blizzard@appliedtheory.com>
411
412        * http_trans.h: Add an "errstr" member to the conn function that
413        will allow you to give back a useable error string.
414
415        * http_resp.c (http_resp_read_headers): Add error strings all over
416        the place so you might be able to find out what the hell is wrong.
417        (http_resp_read_headers): In the event that there's 100 continue
418        line make sure that the "done" flag is set back to zero so you can
419        make the run again.  This only showed up on sync use because async
420        would reset the flag; it was a local variable.
421
422        * http_req.h: Change the void * to a char *, it's really char
423        data.
424
425        * http_req.c (http_req_new): Allocate a header struct on creation.
426        (http_req_destroy): Destroy said header struct.  This may have
427        been the memory leak that I was seeing.
428
4291998-08-30  Christopher Blizzard  <blizzard@appliedtheory.com>
430
431        * ghttp.c (ghttp_set_body): Fix bug that was keeping bodies from
432        getting posted.
433
4341998-08-27  Christopher Blizzard  <blizzard@appliedtheory.com>
435
436        * ghttp.c (ghttp_get_body): New function to get the returned
437        entity body.
438        (ghttp_get_body_len): New funciton to get the length of the
439        returned entity body.
440
4411998-08-26  Christopher Blizzard  <blizzard@appliedtheory.com>
442
443        * ghttp.c: Quick, rewrite the whole api before someone else uses
444        it.  No, really...the function names were quite clunky.  Remove
445        the extranious _request_ from most of them...
446
4471998-08-25  Christopher Blizzard  <blizzard@appliedtheory.com>
448
449        * ghttp.c (ghttp_request_get_socket): New function that will
450        return you the socket from a connection.  This way you can add it
451        to another select() loop like, say, gdk_input_add() ( *hint*
452        *hint* )
453        (ghttp_request_get_status): Improve the logic on what was being
454        returned.  When a request was complete it was showing 0 bytes
455        read.
456
4571998-08-23  Christopher Blizzard  <blizzard@appliedtheory.com>
458
459        * ghttp.c (ghttp_request_clean): New function that will "clean" a
460        request.
461
462        * ghttp.h: Change ghttp_request_abort to ghttp_request_close since
463        that's what it really does...
464
465        * ghttp.c (ghttp_request_parse_date): New function that parses a
466        time.
467        (ghttp_request_status_code): New function to return the status
468        code.
469        (ghttp_request_reason_phrase): New function to return the reason
470        phrase.
471
472        * ghttp_constants.h: New file.
473
474        * http_resp.c (read_body_content_length): Make sure you only read
475        if there's stuff left to read.  If your chunksize is huge you may
476        have already read in the whole entity body.
477
478        * Makefile (CFLAGS): Add the current directory to the list of
479        includes.
480
481        * http_req.c (http_req_prepare): Set a default user agent.
482
483        * http_resp.c (http_resp_destroy): Be free() shamoo.
484
4851998-08-22  Christopher Blizzard  <blizzard@appliedtheory.com>
486
487        * ghttp.c: api still being flushed out.  It works though, you can
488        actually process requests now.
489        (ghttp_request_process): Move the connection routine into the
490        process.
491
492        * http_resp.c (http_resp_read_headers): Make sure you return done
493        if you're done.
494
495        * http_req.c (http_req_send): Make sure you return done if you're
496        actually done.
497
498        * ghttp.c: More api flushed out.
499
500        * http_resp.c (http_resp_read_body): Mark the socket as closed by
501        setting it to -1.
502
503        * http_uri.c (http_uri_parse): Make sure the scoping is right in
504        here...
505
5061998-08-21  Christopher Blizzard  <blizzard@appliedtheory.com>
507
508        * ghttp.h: public API is flushing out.
509
510        * http_uri.c (http_uri_parse): Support not passing in a uri so you
511        can just validate.
512
513        * Makefile (SHARED_OBJS): Add ghttp.o
514
515        * ghttp.h: New file.  The public interface.
516
517        * ghttp.c: New file.  The public interface.
518
519        * http_resp.c (http_resp_read_headers): Now understands the "100
520        Continue" from http 1.1 servers ( like apache ) when you do a
521        post.
522        (http_resp_read_headers): Make sure that the minor part of the
523        http version doesn't get cast to an int accidentally.
524
525        * test_post_client.c: New file.
526
527        * Makefile: add test_post_client
528
529        * http_req.c (http_req_send): Initial stab at getting posting
530        entity bodies working.
531
532        * http_trans.c (http_trans_write_buf): If it was a 0 length write
533        return done.  Also store the last write in the connection
534        structure.
535
536        * http_resp.c (read_body_chunked): Make sure there's data to be
537        clipped before doing it.
538        (http_resp_read_headers): Return an error if there was a zero
539        length read.  This means that the server hung up.
540        (read_chunk): Same.
541        (read_body_content_length): Same.
542        (read_body_chunked): On the first pass make sure that the body is
543        actually copied from the buffer into the response.
544
5451998-08-20  Christopher Blizzard  <blizzard@appliedtheory.com>
546
547        * http_resp.c (read_body_standard): Add in async support.
548        (read_body_content_length): Add in async support.
549        (read_body_chunked): Add in async support.
550        (http_resp_read_body): Reset the state when you are done.
551        (http_resp_read_body): Reset the state.
552        (http_resp_read_headers): Fix problems related to having a chunk
553        size bigger than the entire buffer.  It would get caught in a
554        read()
555        (read_chunk): Fix some subtle problems related to fiding the end
556        of a chunk when there was a chunk that was 1 byte followed by
557        the 0 length ( end of message ) chunk.
558
559        * test_client.c (main): Updates for async.
560
561        * http_req.c (http_req_send): Add in async support.
562
563        * http_trans.h: Add stuff to check whether or not we're doing this
564        sync or async.
565
5661998-08-18  Christopher Blizzard  <blizzard@appliedtheory.com>
567
568        * http_resp.c (read_chunk): Clean up warning.
569
570        * http_req.c (http_req_send): Clean up warning.
571
572        * http_resp.c (read_body_chunked): Fix an obscure bug.  Make sure
573        there there are at least 5 bytes in the queue.  This would show up
574        when a read() on the socket would return exactly 3 bytes which
575        always left the other two read at the beginning of the next
576        request.  The trailing \r\n left over from the previous response
577        would be picked up before the headers on the next request.
578
579        * http_trans.c (http_trans_read_into_buf): Set the last read in
580        the connection structure so the app has a little more information.
581
582        * http_resp.c (read_body_chunked): Rewritten for new buffers.
583        (read_chunk): New buffers.
584        (http_resp_read_body): A connection gets marked as closed if it's
585        a "standard" connection.
586
587        * http_trans.c (http_trans_read_into_buf): The bytes to be read
588        into the buffer should the the size left to read or the chunk size
589        whichever is less.
590
5911998-08-17  Christopher Blizzard  <blizzard@appliedtheory.com>
592
593        * http_resp.c (read_body_standard): Updated to the new buffer
594        system.  Works now for sites that don't have a content length
595        or use transfer encoding.
596
597        * There's so much here re-written I don't know where to start.
598        Almost all of the buffer code has been redone which resulted in
599        about 300 less lines of code.  This is the groundwork for the
600        async code.  The test stub will now download pages again as long
601        as they have a content length.
602       
603        * http_trans.c (http_trans_write_buf): Don't check the socket
604        before writing ( why doesn't this work? )
605        (http_trans_conn_new): Allocate a new buffer when allocating a
606        connection object.
607
608        * http_resp.c (http_resp_read_headers): Don't allocate a buffer,
609        it's already allocated now.
610
611        * http_req.c (http_req_send): Use the new async buffer stuff.
612
613        * http_trans.h: Tons of new stuff in here for async.
614
615        * http_trans.c: Tons of new stuff in here for async.  The package
616        still builds and runs amazingly enough.
617
6181998-08-16  Christopher Blizzard  <blizzard@appliedtheory.com>
619
620        * http_resp.h (http_resp_tag): Getting ready for async.  More
621        state information.
622
623        * http_resp.c (http_resp_read_body): Break out each type of read
624        body out to its own function.  Getting ready for async.
625
626        * http_req.c (http_req_send): Add in state information throughout
627        function for async mode.
628
629        * http_req.h: Start adding state information for http async
630        mode.
631
632        * http_trans.c (http_trans_data_readable): Check to see if
633        there's data available on a socket.     
634        (http_trans_data_writeable): Check to see if a socket's writeable.
635
636        * TODO: New file.  Guess what it's for.
637
638        * http_req.c (http_req_prepare): Remove some cruft.
639
640        * http_global.h: New file that contains definitions that are
641        used in the public and private parts of the library.
642
643        * test_client.c (main): Test stub should start testing http stuff
644        again.
645
646        * http_date.c (http_date_to_time): Parsing now works for RFC
647        850/1036 dates including checking for y2k dates.
648
649        * test_client.c (main): Add some more date parsing including
650        y2k testing.
651
652        * http_date.c (http_date_to_time): Parsing now works for RFC
653        822/1123 dates now.
654        (http_date_to_time): Parsing how works for actime() formats.
655
656        * Makefile (SHARED_OBJS): Add http_date stuff to build.
657
658        * http_date.c: New file
659
660        * http_date.h: New file
661
662        * Makefile (libghttp.a): ranlib the library
663
664        * http_resp.c (http_resp_read_body): Support servers that don't
665        return a content-length header or chunked transfer encoding.
666
6671998-08-15  Christopher Blizzard  <blizzard@appliedtheory.com>
668
669        * Makefile: Change "test.c" to "test_client.c"
670       
671        * Makefile: Create a library libghttp.a
672
6731998-08-14  Christopher Blizzard  <blizzard@appliedtheory.com>
674
675        * test.c (main): Get the length of the body from the struct, not
676        by doing a strlen.  I love it when you find the bug in your test
677        stub, not the code. :)
678
679        * Makefile (clean): Oops.  Clean up shared_objs too.
680
681        * test.c (main): Warning fixes ( shaddap! )
682
683        * Makefile (test): Reorganized for two executables.
684
685        * test_server.c (main): New file.  Basically an echo server for
686        testing header parsing in an attempt to make this library more
687        resistant to bad servers and even "evil" servers.
688
689        * http_hdrs.c (http_hdr_set_value): A break in the wrong place
690        causes problems.
691        (http_hdr_set_value): Change the string that's returned to ref
692        semantics, not copy.
693        (http_hdr_get_value): Return a pointer into the struct, don't copy
694        it.
695
696        * http_resp.c (http_resp_read_headers): Fix bug in the multi line
697        value checking.  Use the length of the old header, not the current
698        one which is, of course, 0, ( duh. )
699
700        * test.c (main): Test stub doesn't test every module now unless
701        you uncomment the #if.  It does take a command line arg uri now.
702
703        * http_resp.c (read_chunk): Bug fix.  Normalize all hex chars in a
704        header chunk to lower case before calculating the size of a chunk.
705        Some servers are upper case, some are lower case.
706
707        * http_uri.c (http_uri_parse): Fix silly bug in the uri parser
708        where the "/" was being chopped off of the front of the resource
709        when a port was included.
710
711        * http_resp.c (http_resp_read_headers): Comments everywhere so
712        someone else might be able to read my parser.
713        (http_resp_read_headers): Start support for multi line values.
714        Although I can't find a server that actually _does_ this I still
715        need to support it.
716
7171998-08-13  Christopher Blizzard  <blizzard@appliedtheory.com>
718
719        * http_trans.c (http_trans_buf_active_len): Removed this function
720        since it was the same as http_trans_buf_unread()
721
722        * http_resp.c (read_chunk): Use the new patt functions below and
723        chunking _works_! Cool beans.
724        (http_resp_read_body): Close the socket if there's a connection:
725        close header
726
727        * http_trans.c (http_trans_buf_unread): Return the number of bytes
728        not yet read in a buffer.
729        (http_trans_buf_append): A bit better.
730        (http_trans_buf_has_patt): New public function.
731        (http_trans_read_patt): New function that will read until either
732        the target buffer is full or it sees a specific pattern in that
733        read data.
734        (http_trans_buf_append_patt): New function that will read into a
735        buffer by size or by pattern, as above.
736
737        * http_resp.c (http_resp_read_body): Well, it sort of does chunked
738        transfer encoding now.  It still needs a lot of debugging though.
739        (read_chunk): If you're using chunked encoding and you see the end
740        of all of the chunks ( 0\r\n\r\n ) make sure you advance the
741        pointer properly.  This seems to help somewhat.
742
7431998-08-12  Christopher Blizzard  <blizzard@appliedtheory.com>
744
745        * http_trans.c (http_trans_conn_destroy): Make sure that the
746        connection struct is properly destroyed.
747
748        * test.c (main): Update test stub to do 10 requests on the same
749        connection.  Works well.
750
751        * http_resp.c (http_resp_read_body): Mark the connection as
752        "closed" if there's a connection: close header
753
754        * http_req.c (http_req_prepare): Make the default to support
755        "keepalives"
756
757        * http_trans.c (http_trans_buf_clean): New function that will
758        clean transport buffers.
759
760        * http_resp.c (http_resp_read_body): Make sure that the buffer
761        will be cleared at the next realloc.
762
763        * http_trans.c (http_trans_buf_realloc): Catch instance where the
764        buffer is in fact empty.  Don't bother copying anything then.
765
766        * http_resp.c (http_resp_read_headers): Read headers converted to
767        new buffer management.  Only about a dozen lines of code saved but
768        boy is it much more readable.
769
770        * http_resp.c (http_resp_read_headers): Uses new buffer
771        management.  Also easier to read.
772
773        * http_trans.c (http_trans_buf_active_len): New function to return
774        the length of the active part of the buffer.
775
776        * http_resp.c (http_resp_read_body): updated to new function
777        naming.
778
779        * http_trans.c (http_trans_buf_new): New function for allocating a
780        new buffer in a connection descriptor.
781        (http_trans_buf_append): New function for reading from a socket in
782        a connection description buffer.
783        (http_trans_buf_free_space): New function that tells you how many
784        bytes are free in a buffer.
785        (http_trans_buf_realloc): Renamed from http_trans_realloc_buf for
786        consistency.
787
7881998-08-12  Christopher Blizzard  <blizzard@odin.appliedtheory.com>
789
790        * http_resp.c (patt_in_buf): Should be an <= not a <.  If the
791        \r\n\r\n was on the end of the buffer ( as in a HEAD request )
792        then the pattern was never found.  I love off by one errors.
793        (http_resp_read_body): Improve the handling of detection of when
794        an entity body is returned in a response.  If it's a head request
795        it looks like it should contain a body but the web server is just
796        trying to fake you out.  Really.
797       
798        * http_resp.h: Update to new function call sig.
799
800        * test.c (main): Update to new function call sig.
801
802        * http_resp.c (http_resp_read_body): Damn.  The response really
803        needs to know about the request since the request may dictate that
804        the entity body is empty, eg in a HEAD request.  This makes it a
805        good bit less modular.
806
8071998-08-11  Christopher Blizzard  <blizzard@appliedtheory.com>
808
809        * test.c (main): Add some more test functionality to download the
810        entity body.  It downloads entity bodies now and displays them. :)
811
812        * http_trans.h: Add allocated field to the connection struct so we
813        know how much we've used.
814
815        * http_resp.h (http_resp_tag): Change the void body to a char
816        body, it's character data.
817
818        * http_resp.c (http_resp_read_body): New function that reads the
819        body of the message.  Currently doesn't do chunked transfer
820        encodings but does use the content length.
821       
822        * http_trans.c (http_trans_realloc_buf): new function that will
823        realloc a buffer on the fly, using the current pointer as the new
824        start point.
825
826        * http_resp.c (http_resp_read_headers): Save the state of the
827        buffer in the connection structure.  There are certianly going to
828        be chunks of the entity header in the buffer.
829
830        * http_trans.h: Add buffer information to the connection
831        description structure.
832       
8331998-08-10  Christopher Blizzard  <blizzard@appliedtheory.com>
834
835        * test.c (main): Change to new function.
836
837        * http_resp.h: Same.
838
839        * http_resp.c (http_resp_read_headers): Renamed from
840        http_resp_read since this will only read headers, not the entity
841        body.
842
8431998-08-09  Christopher Blizzard  <blizzard@appliedtheory.com>
844
845        * http_resp.c (http_resp_read): Lots new code here.  Now parses
846        out the response version, status code, reason phrase and
847        all of the headers.  Body next... Whee!!
848
849        * test.c (main): Add new testing code.
850
851        * http_resp.h (http_resp_new): New function
852        (http_resp_destroy): New function
853
854        * Makefile (OBJS): Add http_resp.o
855
856        * http_resp.c: New file
857
858        * http_resp.h: New file
859
860        * test.c (main): Add stuff to use the new http_req interface.
861
862        * http_req.h: Make that char def extern
863        (http_req_type): default to http_get
864        (http_req): remove a lot of stuff that's not really part of the
865        request, it's part of the connection.
866        (http_req_prepare): New function
867        (http_req_send): New function
868
869        * http_req.c: YSFM: static char's should be defined in a .c file,
870        not a header file.
871        (http_req_new): default to HTTP 1.1
872        (http_req_prepare): New function
873        (http_req_send): New function
874
875        * http_hdrs.h: Put #ifdef's around this header file.
876
877        * http_req.h (http_req_destroy): New func.
878        (http_req_new): New func.
879
8801998-08-06  Christopher Blizzard  <blizzard@appliedtheory.com>
881
882        * Makefile (OBJS): Add http_req.o to the build
883
884        * http_req.h: New file
885
886        * http_req.c: New file
887
8881998-08-05  Christopher Blizzard  <blizzard@appliedtheory.com>
889
890        * Makefile (.deps): Add dependencies until I can automake this.
891
892        * test.c: Added more test code to check out some of the network
893        functions.  It will now connect to a remote web server and send a
894        simple request without parsing the response.
895
896        * http_trans.c: Filled out initial socket connection and functions
897        to read and write blocks of data.
898
899        * http_trans.c: New file.
900
901        * http_trans.h: New file.
902
903        * Makefile (OBJS): Add http_trans.o
904
9051998-08-04  Christopher Blizzard  <blizzard@appliedtheory.com>
906
907        * test.c (main): Add code to test the 400 lines of
908        untested header code.
909
910        * http_hdrs.c (http_hdr_list_destroy): YSFM: Free the value, not
911        the header.
912        (http_hdr_clear_value): Check to make sure that the header isn't
913        NULL before you deref it.
914
9151998-08-04  Christopher Blizzard  <blizzard@odin.appliedtheory.com>
916
917        * .cvsignore: Added .cvsignore file
918
9191998-08-04  Christopher Blizzard  <blizzard@appliedtheory.com>
920
921        * http_uri.c (http_uri_parse): Don't advance the end ptr if you
922        are reading the resource.  The / is part of the resource.
923       
924
Note: See TracBrowser for help on using the repository browser.