Forum Discussion

Andrey23_135672's avatar
Andrey23_135672
Icon for Nimbostratus rankNimbostratus
Oct 15, 2013

HTTP monitor issue

I have a VE machine, BigIP BIG-IP 11.2.1 Build 807.0 Hotfix HF1

 

When trying to create a custom HTTP Monitor with custom headers (as seen in https://support.f5.com/kb/en-us/solutions/public/2000/100/sol2167.html)

 

the monitor then returns Error 400 Bad Request, when tracing we see that the headers arrive twice in the same request.

 

4 Replies

  • I can post TCP Stream

     

    GET /api/charm/monitor HTTP/1.1 Host: myhost.com User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20100101 Firefox/23.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Connection: keep-alive

     

    GET /api/charm/monitor HTTP/1.1 Host: myhost.com User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20100101 Firefox/23.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Connection: keep-alive

     

    HTTP/1.1 400 Bad Request Content-Type: text/html; charset=us-ascii Server: Microsoft-HTTPAPI/2.0 Date: Sun, 13 Oct 2013 13:37:49 GMT Connection: close Content-Length: 339

     

    host.com"> Bad Request

     

    Bad Request - Invalid Header

     

    HTTP Error 400. The request has an invalid header name.

     

     

  • this is mine.

    [root@VIP4400-R69-S33:/S2-green-P:Active:Standalone] config  tmsh list ltm monitor http myhttp
    ltm monitor http myhttp {
        defaults-from http
        destination *:*
        interval 5
        send "GET /api/charm/monitor HTTP/1.1\\r\\nHost: myhost.com\\r\\nUser-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20100101 Firefox/23.0\\r\\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8\\r\\nAccept-Language: en-US,en;q=0.5\\r\\nAccept-Encoding: gzip, deflate\\r\\nConnection: keep-alive\\r\\n\\r\\n"
        time-until-up 0
        timeout 16
    }
    
    [root@VIP4400-R69-S33:/S2-green-P:Active:Standalone] config  ssldump -Aed -nni 0.0 port 80
    New TCP connection 1: 200.200.200.33(41254) <-> 200.200.200.101(80)
    1381792390.8140 (0.0013)  C>S
    ---------------------------------------------------------------
    GET /api/charm/monitor HTTP/1.1
    Host: myhost.com
    User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20100101 Firefox/23.0
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
    Accept-Language: en-US,en;q=0.5
    Accept-Encoding: gzip, deflate
    Connection: keep-alive
    
    ---------------------------------------------------------------
    
    1381792390.8156 (0.0015)  S>C
    ---------------------------------------------------------------
    HTTP/1.1 404 Not Found
    Date: Tue, 15 Oct 2013 13:03:00 GMT
    Server: Apache/2.2.3 (CentOS)
    Content-Length: 290
    Connection: close
    Content-Type: text/html; charset=iso-8859-1
    
    
    
    404 Not Found
    
    Not Found
    The requested URL /api/charm/monitor was not found on this server.
    
    Apache/2.2.3 (CentOS) Server at myhost.com Port 80
    
    ---------------------------------------------------------------
    
  • It may be worthwhile to troubleshoot this from cURL on the command line. Use the -v option for extra verbosity, and use the -H option to add additional headers. Example:

    curl -v http://10.10.10.10/api/charm/monitor -H "Host: myhost.com" -H "User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20100101 Firefox/23.0" -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8" -H "Accept-Language: en-US,en;q=0.5" -H "Accept-Encoding: gzip, deflate" -H "Connection: keep-alive"