comparison src/goodjava/webserver/Connection.java @ 1770:6c01d54edcac

logging
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 15 Jun 2023 17:55:47 -0600
parents b4fa42c1e999
children 32e77b071e09
comparison
equal deleted inserted replaced
1769:9d9683e76496 1770:6c01d54edcac
115 return; 115 return;
116 } 116 }
117 117
118 response = server.handler.handle(request); 118 response = server.handler.handle(request);
119 } catch(ParseException e) { 119 } catch(ParseException e) {
120 logger.warn("parse error\n"+rawHead.trim()+"\n",e); 120 logger.info("parse error\n"+rawHead.trim()+"\n",e);
121 String msg = e.toString(); 121 String msg = e.toString();
122 if( contentType != null ) 122 if( contentType != null )
123 msg = "invalid content for content-type " + contentType + "\n" + msg; 123 msg = "invalid content for content-type " + contentType + "\n" + msg;
124 response = Response.errorResponse(Status.BAD_REQUEST,msg); 124 response = Response.errorResponse(Status.BAD_REQUEST,msg);
125 } 125 }