/* * Copyright (c) 2009-2014 Kazuho Oku, Tokuhiro Matsuno, Daisuke Murase, * Shigeo Mitsunari * * The software is licensed under either the MIT License (below) or the Perl * license. * * 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. */ #ifndef picohttpparser_h #define picohttpparser_h #include #ifdef _MSC_VER #define ssize_t intptr_t #endif #ifdef __cplusplus extern "C" { #endif /* contains name and value of a header (name == NULL if is a continuing line * of a multiline header */ struct phr_header { const char *name; size_t name_len; const char *value; size_t value_len; }; /* returns number of bytes consumed if successful, -2 if request is partial, * -1 if failed */ int phr_parse_request(const char *buf, size_t len, const char **method, size_t *method_len, const char **path, size_t *path_len, int *minor_version, struct phr_header *headers, size_t *num_headers, size_t last_len); /* ditto */ int phr_parse_response(const char *_buf, size_t len, int *minor_version, int *status, const char **msg, size_t *msg_len, struct phr_header *headers, size_t *num_headers, size_t last_len); /* ditto */ int phr_parse_headers(const char *buf, size_t len, struct phr_header *headers, size_t *num_headers, size_t last_len); /* should be zero-filled before start */ struct phr_chunked_decoder { size_t bytes_left_in_chunk; /* number of bytes left in current chunk */ char consume_trailer; /* if trailing headers should be consumed */ char _hex_count; char _state; }; /* the function rewrites the buffer given as (buf, bufsz) removing the chunked- * encoding headers. When the function returns without an error, bufsz is * updated to the length of the decoded data available. Applications should * repeatedly call the function while it returns -2 (incomplete) every time * supplying newly arrived data. If the end of the chunked-encoded data is * found, the function returns a non-negative number indicating the number of * octets left undecoded, that starts from the offset returned by `*bufsz`. * Returns -1 on error. */ ssize_t phr_decode_chunked(struct phr_chunked_decoder *decoder, char *buf, size_t *bufsz); /* returns if the chunked decoder is in middle of chunked data */ int phr_decode_chunked_is_in_data(struct phr_chunked_decoder *decoder); #ifdef __cplusplus } #endif #endif e-headers'>derrick/fix/http-lowercase-headers Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
path: root/integration/bunjs-only-snippets/atob.test.js (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2022-05-11Update Makefilebun-v0.0.80Gravatar Jarred Sumner 1-0/+1
2022-05-11Update MakefileGravatar Jarred Sumner 1-1/+1
2022-05-11Fix export symbols on LinuxGravatar Jarred Sumner 4-25/+153
2022-05-11Add test for import.meta.requireGravatar Jarred Sumner 2-1/+11
2022-05-11[napi] Add a couple more symbolsGravatar Jarred Sumner 1-0/+2
2022-05-11[napi] Fix panic inside napi_fatal_errorGravatar Jarred Sumner 1-11/+18
2022-05-11[napi] Stub a couple moreGravatar Jarred Sumner 3-6/+52
2022-05-11[bun.js] eagerly convert to import.meta.requireGravatar Jarred Sumner 2-3/+24
2022-05-11[json] Fix bug with negative integers in json parserGravatar Jarred Sumner 1-3/+6
2022-05-11[bun.js] Implement a polyfill for the `detect-libc` npm packageGravatar Jarred Sumner 2-0/+53
2022-05-11[bun.js] Implement `import.meta.require`Gravatar Jarred Sumner 13-158/+539
2022-05-11[bun.js] Implement `import.meta.resolveSync`Gravatar Jarred Sumner 3-1/+78
2022-05-10Include napi in plus100Gravatar Jarred Sumner 1-4/+20
2022-05-10Add test for Buffer.byteLengthGravatar Jarred Sumner 1-0/+7
2022-05-10[napi] Error on import .nodeGravatar Jarred Sumner 1-29/+1
2022-05-10Update napi.cppGravatar Jarred Sumner 1-1/+0
2022-05-10[napi] Fix string bugGravatar Jarred Sumner 4-58/+125
2022-05-10[napi] transpile require(*.node) into process.dlopenGravatar Jarred Sumner 4-3/+30
2022-05-10[bun.js] Implement `Buffer.byteLength`Gravatar Jarred Sumner 7-47/+443
2022-05-09Fix extra quote in bundled require errorsGravatar Jarred Sumner 1-2/+2
2022-05-09few more napi functionsGravatar Jarred Sumner 2-1/+30
2022-05-09Update MakefileGravatar Jarred Sumner 1-3/+3
2022-05-09Update Dockerfile.baseGravatar Jarred Sumner 1-1/+1
2022-05-09[napi] getters & setters workGravatar Jarred Sumner 1-26/+39