~ubuntu-branches/ubuntu/lucid/varnish/lucid

« back to all changes in this revision

Viewing changes to bin/varnishtest/vtc_http.c

  • Committer: Bazaar Package Importer
  • Author(s): Stig Sandbeck Mathisen
  • Date: 2009-11-09 11:52:34 UTC
  • mfrom: (5.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091109115234-xxatpmpe0ts92ap6
Tags: 2.0.5-1
* New upstream release
* Add README.source with information about quilt
* Convert to source format 3.0 (quilt)
* Add patch for vcl(7)
* Remove patch for varnishd(1)

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26
26
 * SUCH DAMAGE.
27
27
 *
28
 
 * $Id: vtc_http.c 4004 2009-03-27 12:25:11Z tfheen $
 
28
 * $Id: vtc_http.c 4307 2009-10-08 14:22:17Z tfheen $
29
29
 */
30
30
 
31
31
#include "config.h"
322
322
                pfd[0].revents = 0;
323
323
                i = poll(pfd, 1, hp->timeout);
324
324
                assert(i > 0);
325
 
                assert(hp->prxbuf < hp->nrxbuf);
 
325
                assert(hp->prxbuf + n < hp->nrxbuf);
326
326
                i = read(hp->fd, hp->rxbuf + hp->prxbuf, n);
327
327
                if (i == 0)
328
328
                        return (i);
329
 
                assert(i > 0);
 
329
                if (i <= 0)
 
330
                        vtc_log(hp->vl, 0, "HTTP rx failed (%s)",
 
331
                            strerror(errno));
330
332
                hp->prxbuf += i;
331
333
                hp->rxbuf[hp->prxbuf] = '\0';
332
334
                n -= i;
781
783
        hp->vl = vl;
782
784
        hp->client = client;
783
785
        hp->timeout = 3000;
784
 
        hp->nrxbuf = 8192;
 
786
        hp->nrxbuf = 640*1024;
785
787
        hp->vsb = vsb_newauto();
786
788
        hp->rxbuf = malloc(hp->nrxbuf);         /* XXX */
787
789
        AN(hp->rxbuf);