Fix incorrect sending of HTTP error response through Websocket connections.
This commit is contained in:
		
							parent
							
								
									373b9afd32
								
							
						
					
					
						commit
						6226a05fe3
					
				
					 1 changed files with 5 additions and 3 deletions
				
			
		|  | @ -43,9 +43,11 @@ namespace Mist { | |||
|   } | ||||
|    | ||||
|   void HTTPOutput::onFail(){ | ||||
|     H.Clean(); //make sure no parts of old requests are left in any buffers
 | ||||
|     H.SetBody("Stream not found. Sorry, we tried."); | ||||
|     H.SendResponse("404", "Stream not found", myConn); | ||||
|     if (!webSock){ | ||||
|       H.Clean(); //make sure no parts of old requests are left in any buffers
 | ||||
|       H.SetBody("Stream not found. Sorry, we tried."); | ||||
|       H.SendResponse("404", "Stream not found", myConn); | ||||
|     } | ||||
|     Output::onFail(); | ||||
|   } | ||||
|    | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Thulinma
						Thulinma