parent
							
								
									89feacb813
								
							
						
					
					
						commit
						7d7824701f
					
				| @ -1080,6 +1080,8 @@ int HTTPClient::handleHeaderResponse() | |||||||
|         return HTTPC_ERROR_NOT_CONNECTED; |         return HTTPC_ERROR_NOT_CONNECTED; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |     _canReuse = !_useHTTP10; | ||||||
|  | 
 | ||||||
|     String transferEncoding; |     String transferEncoding; | ||||||
|     _returnCode = -1; |     _returnCode = -1; | ||||||
|     _size = -1; |     _size = -1; | ||||||
| @ -1098,6 +1100,7 @@ int HTTPClient::handleHeaderResponse() | |||||||
| 
 | 
 | ||||||
|             if(headerLine.startsWith("HTTP/1.")) { |             if(headerLine.startsWith("HTTP/1.")) { | ||||||
|                 _returnCode = headerLine.substring(9, headerLine.indexOf(' ', 9)).toInt(); |                 _returnCode = headerLine.substring(9, headerLine.indexOf(' ', 9)).toInt(); | ||||||
|  |                 _canReuse = (_returnCode != '0'); | ||||||
|             } else if(headerLine.indexOf(':')) { |             } else if(headerLine.indexOf(':')) { | ||||||
|                 String headerName = headerLine.substring(0, headerLine.indexOf(':')); |                 String headerName = headerLine.substring(0, headerLine.indexOf(':')); | ||||||
|                 String headerValue = headerLine.substring(headerLine.indexOf(':') + 1); |                 String headerValue = headerLine.substring(headerLine.indexOf(':') + 1); | ||||||
|  | |||||||
| @ -217,7 +217,7 @@ protected: | |||||||
|     String _host; |     String _host; | ||||||
|     uint16_t _port = 0; |     uint16_t _port = 0; | ||||||
|     int32_t _connectTimeout = -1; |     int32_t _connectTimeout = -1; | ||||||
|     bool _reuse = false; |     bool _reuse = true; | ||||||
|     uint16_t _tcpTimeout = HTTPCLIENT_DEFAULT_TCP_TIMEOUT; |     uint16_t _tcpTimeout = HTTPCLIENT_DEFAULT_TCP_TIMEOUT; | ||||||
|     bool _useHTTP10 = false; |     bool _useHTTP10 = false; | ||||||
|     bool _secure = false; |     bool _secure = false; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user