001/* 002 * Copyright 2022-2026 Revetware LLC. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 017package com.soklet; 018 019/** 020 * Reasons a request could not be read or parsed into a valid {@link Request}. 021 * 022 * @author <a href="https://www.revetkn.com">Mark Allen</a> 023 */ 024public enum RequestReadFailureReason { 025 /** 026 * The incoming request could not be parsed into a valid HTTP request. 027 */ 028 UNPARSEABLE_REQUEST, 029 /** 030 * The initial request read timed out before a full request could be parsed. 031 */ 032 REQUEST_READ_TIMEOUT, 033 /** 034 * The request reader rejected the task (for example, due to queue saturation). 035 */ 036 REQUEST_READ_REJECTED, 037 /** 038 * The request body could not be transparently decompressed per the configured 039 * {@link RequestDecompressionPolicy} — an unsupported {@code Content-Encoding} (415), undecodable 040 * content (400), or another decompression failure before a valid {@link Request} could be built. 041 * Decompression size/ratio limit violations for otherwise-parseable requests use the normal 042 * content-too-large request path instead. 043 */ 044 REQUEST_BODY_DECOMPRESSION_FAILED, 045 /** 046 * An unexpected internal error occurred while reading or parsing the request. 047 */ 048 INTERNAL_ERROR 049}