Skip to content

C++ sample project for trying out the VS Code Remote - Containers extension

License

Notifications You must be signed in to change notification settings

pgit/cppcoro-devcontainer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Examples

cmake --build build --config Debug --target all -- && build/http_echo_awaitable
curl -N -H 'Expect:' -H "Content-Type: text/plain" -v http://localhost:8080/LICENSE -T .
curl -N -H 'Expect:' -H "Content-Type: text/plain" -v http://localhost:8080/LICENSE -T . <LICENSE 
curl -N -H 'Expect:' -H "Content-Type: text/plain" -v http://localhost:8080/LICENSE -T LICENSE
curl -N -H 'Expect:' -H "Content-Type: text/plain" -v http://localhost:8080/LICENSE -T . </dev/zero -o /dev/null
curl -N -H 'Expect:' -H "Content-Type: text/plain" -H Transfer-Encoding: -v http://localhost:8080/LICENSE -T . <LICENSE
(echo -e "PUT / HTTP/1.1\r\n\r\n)|socat - TCP-CONNECT:localhost:8080
./nghttp http://127.0.0.1:8080 --upgrade --verbose
../nghttp2/install/bin/nghttpx -o --frontend='0.0.0.0,8080;no-tls' --backend='eisenlohr.org,80'`
# working HTTP2 upgrade
../nghttp2/install/bin/nghttp -nvu http://nghttp2.org/index.html

upgrade.cpp

Custom server with SSL and HTTP2 detection.

cmake --build build --config Debug --target all -- && build/upgrade

Various clients with TLS, HTTP/1.1 + upgrade and HTTP/2

# https, then ALPN=http/1.1: ok
curl -k https://localhost:8080/LICENSE --http1.1

# https, then ALPN=h2: ok
curl -k https://localhost:8080/LICENSE --http2

# http2 prior knowledge: ok
curl -vk http://localhost:8080/LICENSE --http2-prior-knowledge
../nghttp2/install/bin/nghttp -nv http://localhost:8080/LICENSE

# plaintext with upgrade: FAILS
curl -vk http://localhost:8080/LICENSE --http2
../nghttp2/install/bin/nghttp -nvu http://localhost:8080/LICENSE

httpx

About

C++ sample project for trying out the VS Code Remote - Containers extension

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 96.5%
  • Dockerfile 1.7%
  • CMake 1.5%
  • Shell 0.3%