thijsbrentjens
12 years agoNew Contributor
Redirect HTTP 301 Location not used correctly (SoapUI 4.5.1)
Hi all,
SoapUI (version 4.5.1) seems to be changing the Location header information in case a web page returns an HTTP 301 redirect. For example, I have this URL, using an HTTP test:
http://www.nationaalgeoregister.nl:80/g ... anguage=nl
This returns a 301 with location header (full log info below):
HTTP/1.1 301 Moved Permanently
Location: http://geodata.nationaalgeoregister.nl/ ... ik2008.zip
The location then seems to be changed by SoapUI. Since the next HTTP request, created by SoapUI, is:
GET /bestandbodemgebruik2008/extract/bestandbodemgebruik2008.zip
Host: www.nationaalgeoregister.nl:80
This host is not correct. It should have been "geodata.nationaalgeoregister.nl", but SoapUI uses the previous host, the one where the initial request is sent to.
Can someone confirm this? (Careful: the file which is redirected is quite large!!)
If I use wget or a browser it works fine, the 301 Location is followed and returns the file.
Below is some more logging information, if required:
===============
Fri Feb 07 11:42:17 CET 2014:DEBUG:>> "GET /geonetwork/opensearch/dut/download?spatial_dataset_identifier_code=1339c2c0-ddc2-11de-2008-0800200c9a66&spatial_dataset_identifier_namespace=http://www.pdok.nl&crs=http://www.opengis.net/def/crs/EPSG/0/28992&language=nl HTTP/1.1[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:>> "Accept-Encoding: gzip,deflate[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:>> "Range: bytes=0-999[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:>> "Accept: application/x-compressed[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:>> "Host: www.nationaalgeoregister.nl:80[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:>> "Connection: Keep-Alive[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:>> "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:>> "[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:<< "HTTP/1.1 301 Moved Permanently[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:<< "Server: Apache-Coyote/1.1[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:<< "Location: http://geodata.nationaalgeoregister.nl/ ... ik2008.zip[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:<< "Set-Cookie: JSESSIONID=9DED5CA988975A3B76596EB3F91C191C; Domain=www.nationaalgeoregister.nl; Path=/geonetwork/opensearch/dut[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:<< "Content-Encoding: gzip[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:<< "Content-Type: application/x-compressed[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:<< "Content-Length: 20[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:<< "Date: Fri, 07 Feb 2014 10:42:17 GMT[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:<< "[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:<< "[0x1f][0x8b][0x8][0x0][0x0][0x0][0x0][0x0][0x0][0x0][0x3][0x0][0x0][0x0][0x0][0x0][0x0][0x0][0x0][0x0]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:>> "GET /bestandbodemgebruik2008/extract/bestandbodemgebruik2008.zip HTTP/1.1[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:>> "Accept-Encoding: gzip,deflate[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:>> "Range: bytes=0-999[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:>> "Accept: application/x-compressed[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:>> "Host: www.nationaalgeoregister.nl:80[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:>> "Connection: Keep-Alive[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:>> "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"
SoapUI (version 4.5.1) seems to be changing the Location header information in case a web page returns an HTTP 301 redirect. For example, I have this URL, using an HTTP test:
http://www.nationaalgeoregister.nl:80/g ... anguage=nl
This returns a 301 with location header (full log info below):
HTTP/1.1 301 Moved Permanently
Location: http://geodata.nationaalgeoregister.nl/ ... ik2008.zip
The location then seems to be changed by SoapUI. Since the next HTTP request, created by SoapUI, is:
GET /bestandbodemgebruik2008/extract/bestandbodemgebruik2008.zip
Host: www.nationaalgeoregister.nl:80
This host is not correct. It should have been "geodata.nationaalgeoregister.nl", but SoapUI uses the previous host, the one where the initial request is sent to.
Can someone confirm this? (Careful: the file which is redirected is quite large!!)
If I use wget or a browser it works fine, the 301 Location is followed and returns the file.
Below is some more logging information, if required:
===============
Fri Feb 07 11:42:17 CET 2014:DEBUG:>> "GET /geonetwork/opensearch/dut/download?spatial_dataset_identifier_code=1339c2c0-ddc2-11de-2008-0800200c9a66&spatial_dataset_identifier_namespace=http://www.pdok.nl&crs=http://www.opengis.net/def/crs/EPSG/0/28992&language=nl HTTP/1.1[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:>> "Accept-Encoding: gzip,deflate[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:>> "Range: bytes=0-999[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:>> "Accept: application/x-compressed[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:>> "Host: www.nationaalgeoregister.nl:80[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:>> "Connection: Keep-Alive[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:>> "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:>> "[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:<< "HTTP/1.1 301 Moved Permanently[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:<< "Server: Apache-Coyote/1.1[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:<< "Location: http://geodata.nationaalgeoregister.nl/ ... ik2008.zip[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:<< "Set-Cookie: JSESSIONID=9DED5CA988975A3B76596EB3F91C191C; Domain=www.nationaalgeoregister.nl; Path=/geonetwork/opensearch/dut[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:<< "Content-Encoding: gzip[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:<< "Content-Type: application/x-compressed[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:<< "Content-Length: 20[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:<< "Date: Fri, 07 Feb 2014 10:42:17 GMT[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:<< "[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:<< "[0x1f][0x8b][0x8][0x0][0x0][0x0][0x0][0x0][0x0][0x0][0x3][0x0][0x0][0x0][0x0][0x0][0x0][0x0][0x0][0x0]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:>> "GET /bestandbodemgebruik2008/extract/bestandbodemgebruik2008.zip HTTP/1.1[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:>> "Accept-Encoding: gzip,deflate[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:>> "Range: bytes=0-999[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:>> "Accept: application/x-compressed[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:>> "Host: www.nationaalgeoregister.nl:80[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:>> "Connection: Keep-Alive[\r][\n]"
Fri Feb 07 11:42:17 CET 2014:DEBUG:>> "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"