Ralf | 4 Aug 20:39 2002
Picon

parse HTTP stream while it downloads


hi,

i want to parse a http stream while it downloads.

i test it with HTLoadToStream but there i can only write to a file ..

my question is, how can i parse the http stream while it downloads ?

thanks
-Ralf

stephane boyera | 5 Aug 10:04 2002
Picon

problem with post request on persistent connections


Transferred by the moderator to www-lib

 --
Stephane Boyera		stephane <at> w3.org
INRIA/W3C			+33 (0) 4 92 38 78 34 
BP 93				fax: +33 (0) 4 92 38 78 22
F-06902 Sophia Antipolis Cedex,		  
France

-----Original Message-----
From: Priya Roy [mailto:priya_bhaskar <at> yahoo.com] 
Sent: Saturday, August 03, 2002 10:00 PM
To: www-lib <at> w3.org
Cc: priya_bhaskar <at> yahoo.com
Subject: [Moderator Action] Re: problem with post request on persistent
connections

I'm seeing the same problem that was posted earlier by
Mark Horsthuis:
<http://lists.w3.org/Archives/Public/www-lib/2000AprJun/0126.html>.

"the headers of the POST
request are written to the socket that is already
closed by the server
before this socket is closed by lib-www. After this a
new connection to the
webserver is made but only the headers of the POST
request are send via this
connection.  The webserver keeps waiting for the body
(Continue reading)

stephane boyera | 5 Aug 10:05 2002
Picon

Missing #include in some libwww headers


Transferred by the moderator

 --
Stephane Boyera		stephane <at> w3.org
INRIA/W3C			+33 (0) 4 92 38 78 34 
BP 93				fax: +33 (0) 4 92 38 78 22
F-06902 Sophia Antipolis Cedex,		  
France

-----Original Message-----
From: Richard Atterer [mailto:atterer <at> debian.org] 
Sent: Saturday, August 03, 2002 8:36 PM
To: www-lib <at> w3.org
Subject: [Moderator Action] Missing #include in some libwww headers

Hi,

this was reported by a user of the Debian libwww packages (bugs #152576,
#152577):

Some of the libwww headers should contain an '#include "wwwsys.h"'. At
least HTArray.h and HTParse.h need the include - please add it in CVS!

Cheers,

  Richard

--

-- 
  __   _
(Continue reading)

Damien Dougan | 6 Aug 12:26 2002
Picon

Request for Help - Example source for multipart form post


Hi All,

I have completed my client side Get and Post methods, and am now looking at a 
client-sidemultipart form post. I've been through the RFC and am fairly happy 
with the structure of a multipart form, but I am again lost when it comes to 
writing the client side code (well, more confused than lost - a little 
knowledge is a dangerous thing!).

I've seen some previous messages on the mailing list regarding multipart form, 
but they were either too small code fragments for my use, or concentrating on 
an application receiving a multipart form.

What I would really like is if someone had some example code they could give 
me that shows how a client can build a multipart form post.

I have a vector of parts (which I can convert into character buffers), plus a 
URL that they are to be posted to. Looking at the example code fragments from 
other messages, I am unsure whether I should be:

1. Using PUT to post an anchor (one for each part) to the Server.

2. Building a single POST request made up of a number of anchors (one for each 
part) under a parent anchor.

Any help would be much appreciated!

Thanks,

Damien
(Continue reading)

Damien Dougan | 7 Aug 17:57 2002
Picon

Multipart MIME Failing - Anyone cast a helpful eye over this sourcecode (embedded within)???


Hi All,

I'm at a loss with the Multipart MIME handling - I've been banging my head 
against the wall for too long :(

The code below is a fragment of my program. It takes in a HttpRequestPtr (no 
need to see the details, but it simply encapsulates a URL, and the contents of 
the files that are to be uploaded to the server).

The POST operation is issued, and I get a response from the server so the 
communication is working, but the Server never receives the data (or more 
likely, it has received it but it is not in the correct format). The logging 
appears to look like valid data...

Any help would be much appreciated!

The first part of the code below is simply getting the data into a source 
Anchor for POSTing. I'm not sure if this is where the error is (in building 
the multipart), or if it is in the second part (actually issueing the POST via 
libwww).

Thanks,

Damien

HttpResponsePtr HttpLib::DoMultiPartPost (const HttpRequestPtr& req)
{
	// MimeDataContainerPtr is a pointer to a MimeDataContainer which
	// has a vector of Parts - text, binary etc that are contents of
(Continue reading)

Damien Dougan | 7 Aug 17:57 2002
Picon

Multipart MIME Failing - Anyone cast a helpful eye over this sourcecode (embedded within)???


Hi All,

I'm at a loss with the Multipart MIME handling - I've been banging my head 
against the wall for too long :(

The code below is a fragment of my program. It takes in a HttpRequestPtr (no 
need to see the details, but it simply encapsulates a URL, and the contents of 
the files that are to be uploaded to the server).

The POST operation is issued, and I get a response from the server so the 
communication is working, but the Server never receives the data (or more 
likely, it has received it but it is not in the correct format). The logging 
appears to look like valid data...

Any help would be much appreciated!

The first part of the code below is simply getting the data into a source 
Anchor for POSTing. I'm not sure if this is where the error is (in building 
the multipart), or if it is in the second part (actually issueing the POST via 
libwww).

Thanks,

Damien

HttpResponsePtr HttpLib::DoMultiPartPost (const HttpRequestPtr& req)
{
	// MimeDataContainerPtr is a pointer to a MimeDataContainer which
	// has a vector of Parts - text, binary etc that are contents of
(Continue reading)

stephane boyera | 8 Aug 10:42 2002
Picon

RE: xmlparse.dll included in libwww distribution

transferred to www-lib by the moderator
 
Stephane
 
 

 --
Stephane Boyera         stephane <at> w3.org
INRIA/W3C                       +33 (0) 4 92 38 78 34
BP 93                           fax: +33 (0) 4 92 38 78 22
F-06902 Sophia Antipolis Cedex,          
France

-----Original Message-----
From: Mary Donovan [mailto:marylou8 <at> optonline.net]
Sent: Wednesday, August 07, 2002 4:42 PM
To: jentsf <at> prodigy.net; www-lib <at> w3.org
Subject: RE: xmlparse.dll included in libwww distribution

Jami,
i saw your note on the AOL help page and wondered if you found a solution-i am experiencing the same error message "A required .DLL file, XMLPARSE.DLL., was not found"
would appreciate any help that you might offer
Mary
Carl Daniel | 9 Aug 00:57 2002
Picon

Newbie question: getting the result of HTPostAnchor in memory


I'm working from the 'post' sample program.  The program eventually calls HTSaveLocally to write the
response received
from the server after the POST to a file.  What do I need to do to get the response in memory (an HTChunk?) instead?

I've found where HTSaveLocally is set up as the default stream save handler in HTConverterInit, but I'm not
clear what &
when I should do instead...

-cd

Ralf | 9 Aug 08:46 2002
Picon

htrequest - output


hi..

i try to read a http stream but i want to handle the output on this stream by a function .. i dont want to write to
stdout or a file ..

so, i read the docs.. but found nothing helpful :(

can anyone tells me please some function's where i have to look to handle this ?

thanks
-Ralf

Richard Atterer | 9 Aug 12:26 2002
Picon

Re: htrequest - output


Hi Ralf,

On Fri, Aug 09, 2002 at 08:46:52AM +0200, Ralf wrote:
> i try to read a http stream but i want to handle the output on this
> stream by a function .. i dont want to write to stdout or a file ..
> 
> so, i read the docs.. but found nothing helpful :(

Read them again, and then again, then curse, fetch the libwww source
code, wade through it, then read the docs once more - and slowly
things will get a bit clearer... ;-)

The following may not be 100% correct, but will hopefully get you
going in the right direction. You first need to define your own
HTStream class (see /Library/src/HTStream.html and
/Library/User/Architecture/Streams.html):

  static const HTStreamClass downloadWriter = {
    "myDownloadWriter", flush, free, abort, putChar, putString, write
  };
  struct My_HTStream { const HTStreamClass *isa; }
  static const struct My_HTStream writer = { &downloadWriter };

flush, free etc. are function pointers, you must implement these
functions.

If your program runs >1 concurrent downloads, you may actually want
writer to point to a malloc()d object and store other
download-dependent information after the "isa" field. See e.g. how
HTFSave.c in the libwww source does this.

Next, prepare the request:

  request = HTRequest_new();
  HTRequest_setOutputFormat(request, WWW_SOURCE); // Raw data, no headers...
  HTRequest_setOutputStream(request, (HTStream*)&writer); // send to writer
  HTRequest_setAnchor(request, HTAnchor_findAddress("http://foo.com/");
  ...

BTW, if you want to store a pointer to extra information inside the
request, use HTRequest_setContext(). (It took /me/ a long time to find
that one!)

For the remaining general setup calls to libwww, see the LoadToFile.c
example. Generally, it is a good idea to set up a tracer with
HTTrace_setCallback() to see what's going on. Maybe you'll also want
to use HTSetTraceMessageMask() to get more extensive debugging info.

Once you've got basic HTTP downloads working, you may find that HTTP
redirects don't work; if that is the case, use this:

  HTList* converters = HTList_new();
  HTConverterInit(converters); // Register the default set of converters
  HTFormat_setConversion(converters); // Global converters for all requests

To get notified of errors, redirects etc, register an after filter
with HTNet_addAfter().

In general, libwww has a very steep learning curve. If you don't need
its advanced features (e.g. many concurrent downloads, HTTP pipelining
support, easy integration in GTK+ apps), libcurl may actually be
better for you.

Cheers,

  Richard

--

-- 
  __   _
  |_) /|  Richard Atterer     |  CS student at the Technische  |  GnuPG key:
  | \/¯|  http://atterer.net  |  Universität München, Germany  |  0x888354F7
  ¯ '` ¯


Gmane