From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!news.glorb.com!feeder.erje.net!proxad.net!feeder1-2.proxad.net!193.252.117.184.MISMATCH!news.wanadoo.fr!news.wanadoo.fr!not-for-mail Message-ID: <4A4242EE.3010302@obry.net> Date: Wed, 24 Jun 2009 17:14:54 +0200 From: Pascal Obry Organization: Home - http://www.obry.net User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; fr-FR; rv:1.8.1.22) Gecko/20090605 Thunderbird/2.0.0.22 Mnenhy/0.7.5.0 MIME-Version: 1.0 Newsgroups: comp.lang.ada To: "Jacob M. H. Smith" Subject: Re: GNAT.Sockets. Blocking? References: <158756da-21b7-4e2d-b288-7ba030f1f35c@25g2000yqb.googlegroups.com> In-Reply-To: <158756da-21b7-4e2d-b288-7ba030f1f35c@25g2000yqb.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit NNTP-Posting-Date: 24 Jun 2009 17:14:54 CEST NNTP-Posting-Host: 82.124.206.58 X-Trace: 1245856494 news.orange.fr 17098 82.124.206.58:8180 X-Complaints-To: abuse@orange.fr Xref: g2news2.google.com comp.lang.ada:6598 Date: 2009-06-24T17:14:54+02:00 List-Id: Jacob, Not so simple. It all depends on the headers sent back for the web page your are requesting. If you have a size you need to read the exact number of bytes. If you have not the size and you have a chunked transfer encoding you need to read each chunk (see RFC for format) and catenate the result. So to keep the connection open you of course do not want to send the "Connection: close" header. But in this case you must obey the server headers values. A good way to learn all this is to read the RFC and the AWS code which handles all those cases. Pascal. -- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://www.obry.net - http://v2p.fr.eu.org --| "The best way to travel is by means of imagination" --| --| gpg --keyserver keys.gnupg.net --recv-key F949BD3B