cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Unit tests with several responses

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Fri, 20 Jul 2012 23:36:53 +0200

On Fri, Jul 20, 2012 at 02:15:46AM +0000, Joe Mason wrote:
> <dataNUM>
> Send back this contents instead of the <data> one. The num is set by:
> A) The test number in the request line is >10000 and this is the remainder
> of [test case number]%10000.
>
> So I have sections <data1>, <data2>, <data3>, and in the <protocol> section, GET requests for /10001, /10002 and /10003. If I understand this right, it should send back the response in <data1> when it gets the request for /10001, etc. But I must not understand this, because when I run this, I get "server returned nothing (no headers, no data)". I also can't figure out how it interacts with

The GET number in the example file you provided was incorrect. If test 2023
is supposed to request <data1> then the GET request must be for
http://%HOSTIP:%HTTPPORT/20230001

> B) The request was HTTP and included digest details, which adds 1000 to NUM
> and with swsbounce.

Subsequent requests will be for <data1001> and so on.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-07-20