-
Notifications
You must be signed in to change notification settings - Fork 14.8k
send_request_cgi! does NOT properly follow redirects. #13092
Copy link
Copy link
Closed
Labels
Description
Am I missing something ?
res = send_request_cgi!({
'method' => 'GET',
'cookie' => @cookie,
'uri' => normalize_uri(target_uri.path, 'schedule', 'backup', '/'),
})
Here is the output
####################
# Request:
####################
GET /schedule/backup/ HTTP/1.1
Host: 192.168.74.218:8083
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Cookie: PHPSESSID=u33bl78gjfjh35gnjqp8r77703;
Content-Type: application/x-www-form-urlencoded
####################
# Response:
####################
HTTP/1.1 302 Moved Temporarily
Server: nginx
Date: Wed, 18 Mar 2020 09:59:08 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Keep-Alive: timeout=60
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Location: /list/backup/
####################
# Request:
####################
GET /schedule/list/backup/ HTTP/1.1
Host: 192.168.74.218:8083
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Cookie: PHPSESSID=u33bl78gjfjh35gnjqp8r77703;
Content-Type: application/x-www-form-urlencoded
It should ve sending request to the /list/backup/ instead of /schedule/list/backup/ .
Am I missing something ?
Reactions are currently unavailable