Package com.ramforth.webserver.http.headers.general

Examples of com.ramforth.webserver.http.headers.general.ContentDispositionHttpHeader


            }

            IHttpHeadersParser headersParser = new HttpHeadersParser();
            IHttpHeaders headers = headersParser.parse(inputStream);

            ContentDispositionHttpHeader partContentDisposition = (ContentDispositionHttpHeader) headers.getHeader("Content-Disposition");
            if (partContentDisposition == null
                    || !partContentDisposition.getDispositionType().getType().equalsIgnoreCase("form-data")
                    || !partContentDisposition.getDispositionType().getParameters().containsName("name")) {
                throw new HttpException(HttpStatusCode.STATUS_400_BAD_REQUEST,
                        String.format("Bad Content-Disposition: %s.", partContentDisposition.getRawValue()));
            }

            ContentTypeHttpHeader partContentType = (ContentTypeHttpHeader) headers.getHeader("Content-Type");
            BoundaryDelimitedInputStream bdis = new BoundaryDelimitedInputStream(inputStream, boundary);
View Full Code Here


                break;
            case "transfer-encoding":
                header = new TransferEncodingHttpHeader(rawValue);
                break;
            case "content-disposition":
                header = new ContentDispositionHttpHeader(rawValue);
                break;
            default:
                header = new StringHttpHeader(name, rawValue);
                break;
        }
View Full Code Here

TOP

Related Classes of com.ramforth.webserver.http.headers.general.ContentDispositionHttpHeader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.