mirror of
https://github.com/zap-proto/http.git
synced 2026-10-04 03:07:19 +00:00
HTTP request/response semantics over the ZAP transport. Drop-in net/http.Handler server and net/http.RoundTripper client; existing handlers and http.Client code work unchanged. Wire format: one Cap'n Proto frame per HTTP message (schema/zap_http.capnp). v0.1 ships length-prefixed framing over TCP; v0.2 will swap that for the full ZAP transport (X-Wing PQ KEM handshake + AEAD framing) once zap-proto/go provides it. The marshal/unmarshal API is stable across that change. Includes: - schema/zap_http.capnp (Cap'n Proto schema, source of truth) - internal/capnp/ (generated Go bindings) - wire.go (Marshal/Unmarshal Request/Response) - transport.go (length-prefixed framing) - server.go (Server + ListenAndServe) - client.go (Transport + Get convenience) - examples/hello (server + client in one binary) - 7 tests covering GET, POST, large body (4 MiB), multi-value headers, status code propagation, keep-alive, marshal idempotence Tests pass; smoke test confirms end-to-end exchange works.
60 lines
2.4 KiB
Plaintext
60 lines
2.4 KiB
Plaintext
zap-http is licensed under either of
|
|
|
|
Apache License, Version 2.0
|
|
(https://www.apache.org/licenses/LICENSE-2.0)
|
|
|
|
MIT License
|
|
(https://opensource.org/licenses/MIT)
|
|
|
|
at your option.
|
|
|
|
Unless you explicitly state otherwise, any contribution intentionally
|
|
submitted for inclusion in this project, as defined in the Apache-2.0
|
|
license, shall be dual-licensed as above, without any additional terms
|
|
or conditions.
|
|
|
|
----------------------------------------------------------------------
|
|
MIT LICENSE
|
|
----------------------------------------------------------------------
|
|
|
|
Copyright (c) The ZAP Protocol Authors
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining
|
|
a copy of this software and associated documentation files (the
|
|
"Software"), to deal in the Software without restriction, including
|
|
without limitation the rights to use, copy, modify, merge, publish,
|
|
distribute, sublicense, and/or sell copies of the Software, and to
|
|
permit persons to whom the Software is furnished to do so, subject
|
|
to the following conditions:
|
|
|
|
The above copyright notice and this permission notice shall be
|
|
included in all copies or substantial portions of the Software.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
|
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
|
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
SOFTWARE.
|
|
|
|
----------------------------------------------------------------------
|
|
APACHE LICENSE, VERSION 2.0
|
|
----------------------------------------------------------------------
|
|
|
|
Apache License, Version 2.0, January 2004
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing,
|
|
software distributed under the License is distributed on an
|
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
|
either express or implied. See the License for the specific
|
|
language governing permissions and limitations under the License.
|