Я получаю HTTP / 1.1 500 Internal Server Error. Я пытаюсь сделать следующее: я отправляю пакет http, хотя сокет, в котором пакет http содержит данные, а файл - это мой пакет
POST /my/service HTTP/1.0
Host: myhostname.com
Accept: */*
Content-Type: multipart/form-data; boundary=----acbn1234
Content-Length: 62
------acbn1234
Content-Disposition: form-data; name="segment"
name
------acbn1234
Content-Disposition: form-data; name="segid"
abc123
------acbn1234
Content-Disposition: form-data; name="segname"
segment1
------acbn1234
Content-Disposition: form-data; name="txtfile"; filename="textfile.txt"
Content-Type: text/plain
segment information this the data in the file
------acbn1234--
на стороне сервера Apache Tomcat сервер показывает исключение на консоли
SEVERE: Servlet.service() for servlet ssp-dispatcher threw exception
org.apache.commons.fileupload.MultipartStream$MalformedStreamException: Stream ended unexpectedly
at org.apache.commons.fileupload.MultipartStream.readHeaders(MultipartStream.java:538)
at org.apache.commons.fileupload.FileUploadBase$FileItemIteratorImpl.findNextItem(FileUploadBase.java:999)
at org.apache.commons.fileupload.FileUploadBase$FileItemIteratorImpl.hasNext(FileUploadBase.java:1063)
at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:357)
at org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:126)
at org.springframework.web.multipart.commons.CommonsMultipartResolver.parseRequest(CommonsMultipartResolver.java:155)
at org.springframework.web.multipart.commons.CommonsMultipartResolver.resolveMultipart(CommonsMultipartResolver.java:138)
at org.springframework.web.servlet.DispatcherServlet.checkMultipart(DispatcherServlet.java:887)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:750)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:669)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:585)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:291)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:877)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:594)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1675)
at java.lang.Thread.run(Unknown Source)
где я не прав, мой HTTP-пакет в порядке, сервер не показывает неверный запрос, т. Е. 404 Я думаю, что он показывает внутреннюю ошибку сервера 500. ??