File: proxy-works

package info (click to toggle)
nghttp2 1.64.0-1.1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 7,844 kB
  • sloc: cpp: 55,820; ansic: 52,049; python: 2,927; makefile: 1,371; sh: 200; ruby: 66; lisp: 2
file content (17 lines) | stat: -rwxr-xr-x 307 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

# Nghttpx should proxy the port 80 by default.

exec 2>&1
set -eux

PROXY=http://localhost:3000

# Verify that we can connect
nghttp ${PROXY} > /dev/null

# Extract HTTP error code
STATUS=$(nghttp ${PROXY} -v | grep -Po '(?<=:status: )(\d+)')

# Verify it's OK (200).
echo ${STATUS} | grep 200