|
5 | 5 | #include "sentry_ratelimiter.h" |
6 | 6 | #include "sentry_string.h" |
7 | 7 |
|
8 | | -#ifdef SENTRY_GZIPPED_COMPRESSION |
| 8 | +#ifdef SENTRY_TRANSPORT_COMPRESSION |
9 | 9 | # include "zlib.h" |
10 | 10 | #endif |
11 | 11 |
|
12 | | -#define ENVELOPE_MIME "application/x-sentry-envelope" |
| 12 | +#ifdef SENTRY_TRANSPORT_COMPRESSION |
13 | 13 | // The headers we use are: `x-sentry-auth`, `content-type`, `content-encoding`, |
14 | 14 | // `content-length` |
15 | 15 | #define MAX_HTTP_HEADERS 4 |
| 16 | +#else |
| 17 | +// The headers we use are: `x-sentry-auth`, `content-type`, `content-length` |
| 18 | +#define MAX_HTTP_HEADERS 3 |
| 19 | +#endif |
16 | 20 |
|
17 | 21 | typedef struct sentry_transport_s { |
18 | 22 | void (*send_envelope_func)(sentry_envelope_t *envelope, void *state); |
@@ -153,7 +157,7 @@ sentry_transport_free(sentry_transport_t *transport) |
153 | 157 | sentry_free(transport); |
154 | 158 | } |
155 | 159 |
|
156 | | -#ifdef SENTRY_GZIPPED_COMPRESSION |
| 160 | +#ifdef SENTRY_TRANSPORT_COMPRESSION |
157 | 161 | static bool |
158 | 162 | gzipped_with_compression(const char *body, const size_t body_len, |
159 | 163 | char **compressed_body, size_t *compressed_body_len) |
@@ -221,7 +225,7 @@ sentry__prepare_http_request(sentry_envelope_t *envelope, |
221 | 225 | } |
222 | 226 |
|
223 | 227 | bool compressed = false; |
224 | | -#ifdef SENTRY_GZIPPED_COMPRESSION |
| 228 | +#ifdef SENTRY_TRANSPORT_COMPRESSION |
225 | 229 | char *compressed_body = NULL; |
226 | 230 | size_t compressed_body_len = 0; |
227 | 231 | compressed = gzipped_with_compression( |
|
0 commit comments