barehttp 0.1.0

Blocking HTTP/1.1 client for no_std + alloc
Documentation
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /tmp/nginx.pid;

events {
  worker_connections 64;
}

http {
  include /etc/nginx/mime.types;
  default_type application/octet-stream;
  access_log /var/log/nginx/access.log;
  sendfile on;
  keepalive_timeout 5;
  gzip on;
  gzip_types text/plain application/octet-stream;
  gzip_min_length 1;
  gzip_proxied any;
  # Prefer identity unless client sends Accept-Encoding: gzip.
  gzip_disable "msie6";

  server {
    listen 80;
    server_name _;

    location = /plain {
      default_type text/plain;
      return 200 'hello';
    }

    # nginx `return` uses Content-Length; body is still deterministic for the client.
    location = /chunked {
      default_type text/plain;
      return 200 'hello';
    }

    location = /gzip {
      default_type text/plain;
      # Client sends Accept-Encoding: gzip when the gzip feature is enabled.
      return 200 'hello-gzip';
    }

    location = /headers {
      default_type text/plain;
      add_header X-Interop-Server nginx always;
      add_header X-Echo-UA $http_user_agent always;
      return 200 'ok';
    }

    location = /status/404 {
      default_type text/plain;
      return 404 'missing';
    }

    location = /close {
      default_type text/plain;
      add_header Connection close always;
      keepalive_timeout 0;
      return 200 'bye';
    }

    location = /http10 {
      default_type text/plain;
      return 200 'http10-ish';
    }

    location / {
      root /usr/share/nginx/html;
    }
  }
}