fix inverted logic
This commit is contained in:
		
							parent
							
								
									44ca12ead6
								
							
						
					
					
						commit
						f801fd1f0d
					
				@ -113,7 +113,14 @@ void RequestHandler::handle_request(const http::Request &req, http::Reply &reply
 | 
			
		||||
                reply.headers[2].name = "Content-Disposition";
 | 
			
		||||
                reply.headers[2].value = "attachment; filename=\"route.gpx\"";
 | 
			
		||||
            }
 | 
			
		||||
            else if (!route_parameters.jsonp_parameter.empty())
 | 
			
		||||
            else if (route_parameters.jsonp_parameter.empty())
 | 
			
		||||
            {
 | 
			
		||||
                reply.headers[1].name = "Content-Type";
 | 
			
		||||
                reply.headers[1].value = "application/x-javascript; charset=UTF-8";
 | 
			
		||||
                reply.headers[2].name = "Content-Disposition";
 | 
			
		||||
                reply.headers[2].value = "inline; filename=\"response.json\"";
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                reply.content.push_back(')');
 | 
			
		||||
                reply.headers[1].name = "Content-Type";
 | 
			
		||||
@ -121,13 +128,6 @@ void RequestHandler::handle_request(const http::Request &req, http::Reply &reply
 | 
			
		||||
                reply.headers[2].name = "Content-Disposition";
 | 
			
		||||
                reply.headers[2].value = "inline; filename=\"response.js\"";
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                reply.headers[1].name = "Content-Type";
 | 
			
		||||
                reply.headers[1].value = "application/x-javascript; charset=UTF-8";
 | 
			
		||||
                reply.headers[2].name = "Content-Disposition";
 | 
			
		||||
                reply.headers[2].value = "inline; filename=\"response.json\"";
 | 
			
		||||
            }
 | 
			
		||||
            reply.headers[0].name = "Content-Length";
 | 
			
		||||
            reply.headers[0].value = IntToString(reply.content.size());
 | 
			
		||||
            return;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user