File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / curl / tests / data / test187
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Wed Jun 3 10:01:16 2020 UTC (5 years ago) by misho
Branches: curl, MAIN
CVS tags: v7_70_0p4, HEAD
curl

    1: <testcase>
    2: <info>
    3: <keywords>
    4: HTTP
    5: HTTP GET
    6: followlocation
    7: </keywords>
    8: </info>
    9: 
   10: # Server-side
   11: <reply>
   12: <data>
   13: HTTP/1.1 301 This is a weirdo text message
   14: Date: Thu, 09 Nov 2010 14:49:00 GMT
   15: Server: test-server/fake
   16: Location: /root/1870002.txt?coolsite=yes
   17: Connection: close
   18: 
   19: This server reply is for testing a simple Location: following
   20: 
   21: </data>
   22: <data2>
   23: HTTP/1.1 200 Followed here fine swsclose
   24: Date: Thu, 09 Nov 2010 14:49:00 GMT
   25: Server: test-server/fake
   26: Content-Length: 52
   27: 
   28: If this is received, the location following worked
   29: 
   30: </data2>
   31: <datacheck>
   32: HTTP/1.1 301 This is a weirdo text message
   33: Date: Thu, 09 Nov 2010 14:49:00 GMT
   34: Server: test-server/fake
   35: Location: /root/1870002.txt?coolsite=yes
   36: Connection: close
   37: 
   38: HTTP/1.1 200 Followed here fine swsclose
   39: Date: Thu, 09 Nov 2010 14:49:00 GMT
   40: Server: test-server/fake
   41: Content-Length: 52
   42: 
   43: If this is received, the location following worked
   44: 
   45: </datacheck>
   46: </reply>
   47: 
   48: # Client-side
   49: <client>
   50: <server>
   51: http
   52: </server>
   53:  <name>
   54: HTTP redirect with bad host name separation and slash in parameters
   55:  </name>
   56:  <command>
   57: http://%HOSTIP:%HTTPPORT?oh=what-weird=test/187 -L
   58: </command>
   59: </client>
   60: 
   61: # Verify data after the test has been "shot"
   62: <verify>
   63: <strip>
   64: ^User-Agent:.*
   65: </strip>
   66: <protocol>
   67: GET /?oh=what-weird=test/187 HTTP/1.1
   68: Host: %HOSTIP:%HTTPPORT
   69: Accept: */*
   70: 
   71: GET /root/1870002.txt?coolsite=yes HTTP/1.1
   72: Host: %HOSTIP:%HTTPPORT
   73: Accept: */*
   74: 
   75: </protocol>
   76: </verify>
   77: </testcase>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>