Merge f76b87252e into e7586153be
				
					
				
			This commit is contained in:
		
						commit
						24a9c9bace
					
				| 
						 | 
					@ -213,6 +213,16 @@ func (p *Proxy) proxyHTTPRequest(
 | 
				
			||||||
		roundTripReq.Header.Set("Connection", "keep-alive")
 | 
							roundTripReq.Header.Set("Connection", "keep-alive")
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // Handle GOAWAY frame to correctly retry a request
 | 
				
			||||||
 | 
					    if roundTripReq.Body != nil {
 | 
				
			||||||
 | 
					        roundTripReq.GetBody = func() (io.ReadCloser, err error) {
 | 
				
			||||||
 | 
					            if err.Error() == "http2: Transport received Server's graceful shutdown GOAWAY" {
 | 
				
			||||||
 | 
					                return roundTripReq.Body, nil
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            return nil, err
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Set the User-Agent as an empty string if not provided to avoid inserting golang default UA
 | 
						// Set the User-Agent as an empty string if not provided to avoid inserting golang default UA
 | 
				
			||||||
	if roundTripReq.Header.Get("User-Agent") == "" {
 | 
						if roundTripReq.Header.Get("User-Agent") == "" {
 | 
				
			||||||
		roundTripReq.Header.Set("User-Agent", "")
 | 
							roundTripReq.Header.Set("User-Agent", "")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue