# 100 Continue

> https://http-status.org/docs/100

**Family:** 1xx Informational

## Rationale

Interim response: the server received the request headers and invites the client to send the body.

## In Plain Terms

Imagine calling ahead before mailing a very heavy package: 'Can you accept this?' The post office says yes, so you drive it over. That's 100 Continue — the server greenlit the request headers, so send the rest of the data.

## Description

The HTTP 100 Continue status code is an interim response that indicates the server received the request headers and is ready to receive the request body. It is mainly used when a client sends a special header (Expect: 100-continue) to ask for permission before uploading a large body, so it can avoid the wasted bandwidth of sending data the server might reject.

## Server Perspective

### Usage
- Send 100 when the request uses Expect: 100-continue and the server is willing to receive the body
- Use it when method, target URI, and headers are acceptable, but you want to avoid receiving a large body only to reject it later
- Large uploads where the client sends Expect: 100-continue
- Requests where auth, size limits, or permissions can be validated from headers alone — before committing to sending the body
- Avoiding unnecessary bandwidth when a request might be rejected early

### Implementation
- Validate the request line and headers first, then either send 100 or an immediate final response if the outcome can already be determined from headers alone
- When you decide to honor Expect: 100-continue, send 100 immediately; the origin server MUST NOT wait for the content before sending 100
- You may omit 100 if some or all of the request body already arrived, but if you send 100 you must still send a final response after processing completes

### Common Headers
- Look for Expect: 100-continue on the request; no status-specific response header is required for the 100 itself.

### Body
- Do not include a response body in a 100 response.

### Pitfalls
- Do not send 100 as the final outcome of the request
- Do not send 100 when you already know the request should fail from headers alone; send the final 4xx or 5xx response instead
- Do not send 100 and then leave the client waiting; a final response must still follow unless the connection closes prematurely
- Small request bodies where the extra round trip is not worth it
- When the server cannot validate headers before reading the body
- Normal GET or HEAD requests without meaningful bodies
- As a substitute for a final response — 100 must always be followed by a real status code like 200 or 400

## Client Perspective

### Pitfalls
- Do not treat 100 as a success result for the whole operation
- Avoid sending Expect: 100-continue for small bodies — the extra round trip adds latency without meaningful benefit

## Examples

### Large file upload with validation

Without this handshake, a client might upload 50 MB only to receive a 401 or 413 at the end. The server uses 100 to signal early approval before that bandwidth cost is incurred.

**Request:**
```
POST https://api.example.test/api/upload
Expect: 100-continue
Content-Length: 52428800
Content-Type: video/mp4

<50 MB video file>
```

**Response:**
```
201 Created
Location: https://api.example.test/api/uploads/123
Content-Type: application/json

{
  "id": "upload_123",
  "status": "stored"
}

; Internally, the server sent 100 Continue after inspecting the headers; the client held the body until that approval arrived.
```

### Upload rejected before body transfer

The server can reject unsupported uploads from headers alone, so the client never sends a large body that would be discarded immediately.

**Request:**
```
POST https://api.example.test/api/upload
Expect: 100-continue
Content-Type: video/x-msvideo
Content-Length: 52428800

<50 MB video file>
```

**Response:**
```
415 Unsupported Media Type

; The server rejected from headers alone — the body was never transmitted, saving 50 MB of bandwidth.
```

## Related Codes

- [101 Switching Protocols](/docs/101.md)
- [102 Processing](/docs/102.md)
- [103 Early Hints](/docs/103.md)

