Discussion:
[PATCH] REGTEST/MINOR: remove double body specification for server txresp
PiBa-NL
2018-12-08 18:51:59 UTC
Permalink
Hi List,

I'm getting a regtest failure for the h00001.vtc test, seemingly because
varnishtest doesn't like the definition.

Error (full log attached):
**** s1    0.0 http[23] |be-hdr-crc: 3634102538
**** s1    0.0 bodylen = 0
**   s1    0.0 === txresp \
---- s1    0.0 Assert error in http_tx_parse_args(), vtc_http.c line
870:  Condition(body == nullbody) not true.

***  h1    1.0 debug|00000000:be.srvcls[000b:adfd]
***  h1    1.0 debug|00000000:be.clicls[000b:adfd]

This comes from the following definition:

    txresp \
      -status 234 \
      -hdr "hdr1: val1" \
      -hdr "hdr2:  val2a" \
      -hdr "hdr2:    val2b" \
      -hdr "hdr3:      val3a, val3b" \
      -hdr "hdr4:" \
      -bodylen 14 \
      -body "This is a body"

Where both -bodylen and -body are defined, while it seems to me these 2
settings are 'conflicting', as the '-bodylen' generates a kinda random
body content. While '-body' defines the exact string to send as a body..

Seems to me that the bodylen should be removed? Patch that does that
attached.

Regards,

PiBa-NL
Willy Tarreau
2018-12-08 18:57:39 UTC
Permalink
Hi Pieter,
Post by PiBa-NL
Hi List,
I'm getting a regtest failure for the h00001.vtc test, seemingly because
varnishtest doesn't like the definition.
**** s1    0.0 http[23] |be-hdr-crc: 3634102538
**** s1    0.0 bodylen = 0
**   s1    0.0 === txresp \
---- s1    0.0 Assert error in http_tx_parse_args(), vtc_http.c line 870: 
Condition(body == nullbody) not true.
***  h1    1.0 debug|00000000:be.srvcls[000b:adfd]
***  h1    1.0 debug|00000000:be.clicls[000b:adfd]
    txresp \
      -status 234 \
      -hdr "hdr1: val1" \
      -hdr "hdr2:  val2a" \
      -hdr "hdr2:    val2b" \
      -hdr "hdr3:      val3a, val3b" \
      -hdr "hdr4:" \
      -bodylen 14 \
      -body "This is a body"
Where both -bodylen and -body are defined, while it seems to me these 2
settings are 'conflicting', as the '-bodylen' generates a kinda random body
content. While '-body' defines the exact string to send as a body..
Ah interesting, I didn't have this issue here and thought the bodylen
was needed.
Post by PiBa-NL
Seems to me that the bodylen should be removed? Patch that does that
attached.
It still works for me with your patch so I've applied it.

Thanks!
Willy

Loading...