Skip to content

pingora-proxy examples don't support pipelining #377

@kenballus

Description

@kenballus

Describe the bug

The pingora-proxy examples don't support client-side HTTP pipelining.

Pingora info

Please include the following information about your environment:

Pingora version: e288bfe (built from source)
Rust version: cargo 1.79.0 (ffa9cf99a 2024-06-03)
Operating system version: Debian 12

Steps to reproduce

  1. Build the pingora-proxy gateway example.
  2. Test that it works:
printf 'GET / HTTP/1.1\r\nHost: one.one.one.one\r\n\r\n' \
  | ncat --no-shutdown localhost 6191 \
  | grep -oP 'HTTP/1.1 \d\d\d'
HTTP/1.1 200
  1. Test that client-side connection reuse works when requests are not pipelined:
(printf 'GET / HTTP/1.1\r\nHost: one.one.one.one\r\n\r\n'; sleep 1; printf 'GET / HTTP/1.1\r\nHost: one.one.one.one\r\n\r\n') \
  | ncat --no-shutdown localhost 6191 \
  | grep -oP 'HTTP/1.1 \d\d\d'
HTTP/1.1 200
HTTP/1.1 200
  1. Observe that connection reuse doesn't work when requests are pipelined:
printf 'GET / HTTP/1.1\r\nHost: one.one.one.one\r\n\r\nGET / HTTP/1.1\r\nHost: one.one.one.one\r\n\r\n' \
  | ncat --no-shutdown localhost 6191 \
  | grep -oP 'HTTP/1.1 \d\d\d'
HTTP/1.1 200

Expected results

I expect to get 2 responses when sending 2 pipelined requests.

Observed results

I only get 1 response.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions