001/* 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, 013 * software distributed under the License is distributed on an 014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 015 * KIND, either express or implied. See the License for the 016 * specific language governing permissions and limitations 017 * under the License. 018 */ 019package org.eclipse.aether.spi.connector.transport.http; 020 021import java.util.regex.Pattern; 022 023/** 024 * Some shared HTTP constants. 025 * 026 * @since 2.0.0 027 */ 028public final class HttpConstants { 029 private HttpConstants() {} 030 031 public static final int MULTIPLE_CHOICES = 300; 032 033 public static final int NOT_FOUND = 404; 034 035 public static final int PRECONDITION_FAILED = 412; 036 037 public static final String ACCEPT_ENCODING = "Accept-Encoding"; 038 039 public static final String CACHE_CONTROL = "Cache-Control"; 040 041 public static final String CONTENT_LENGTH = "Content-Length"; 042 043 public static final String CONTENT_RANGE = "Content-Range"; 044 045 public static final String ETAG = "ETag"; 046 047 public static final String IF_UNMODIFIED_SINCE = "If-Unmodified-Since"; 048 049 public static final String RANGE = "Range"; 050 051 public static final String USER_AGENT = "User-Agent"; 052 053 public static final String LAST_MODIFIED = "Last-Modified"; 054 055 public static final Pattern CONTENT_RANGE_PATTERN = 056 Pattern.compile("\\s*bytes\\s+([0-9]+)\\s*-\\s*([0-9]+)\\s*/.*"); 057}