[GH-ISSUE #1670] "Copy as" cURL omits "accept-encoding" header #1662

Closed
opened 2026-03-03 19:53:16 +03:00 by kerem · 12 comments
Owner

Originally created by @seidnerj on GitHub (Jun 7, 2023).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1670

Originally assigned to: @NghiaTranUIT on GitHub.

Description

"Copy cURL" omits "accept-encoding" header

Steps to Reproduce

(test using HTTP v1.1)

  1. Record a request that has the accept-encoding header present
  2. "Copy cURL"

Current Behavior

cURL command does not contain the "accept-encoding" header

Expected Behavior

cURL command should include all headers

Environment

  • App version: ProxyMan 4.8.0
  • macOS version: macOS Ventura v13.4
Originally created by @seidnerj on GitHub (Jun 7, 2023). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1670 Originally assigned to: @NghiaTranUIT on GitHub. ## Description "Copy cURL" omits "accept-encoding" header ## Steps to Reproduce (test using HTTP v1.1) 1. Record a request that has the accept-encoding header present 2. "Copy cURL" ## Current Behavior cURL command does not contain the "accept-encoding" header ## Expected Behavior cURL command should include all headers ## Environment - App version: ProxyMan 4.8.0 - macOS version: macOS Ventura v13.4
kerem 2026-03-03 19:53:16 +03:00
Author
Owner

@seidnerj commented on GitHub (Jun 7, 2023):

Also, potentially related issue (which might be related to some other issues I'm seeing): when running a cURL request through Proxyman to a URL that returns a gzip encoded response, the response is returned unencoded, but when not specifying Proxyman as a proxy server to cURL, you get binary output.

Here is an example. The next command returns unencoded output:

curl 'https://www.amazon.com/gp/aw/c' \
-H 'Host: www.amazon.com' \
-H 'user-agent: Mozilla/5.0 (iPhone; CPU iPhone OS 16_5} like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148' \
-H 'accept-language: en-US,en;q=0.9' \
--cookie 'x-main="4Z1Mzz53uzeMicHDK1GT0lSGil5f2Hx29rWundALnER8uCukLfK1ep0@Si2H1mVZ"' \
--proxy http://localhost:9090

<!doctype html><html lang="en-us" class="a-no-js a-touch ....

Whereas this (simply omitting the proxy), returns binary output:

curl 'https://www.amazon.com/gp/aw/c' \
-H 'Host: www.amazon.com' \
-H 'user-agent: Mozilla/5.0 (iPhone; CPU iPhone OS 16_5} like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148' \
-H 'accept-language: en-US,en;q=0.9' \
--cookie 'x-main="4Z1Mzz53uzeMicHDK1GT0lSGil5f2Hx29rWundALnER8uCukLfK1ep0@Si2H1mVZ"'
Warning: Binary output can mess up your terminal. Use "--output -" to tell 
Warning: curl to output it to your terminal anyway, or consider "--output 
Warning: <FILE>" to save to a file.

I am using the following version of cURL:

~ ❯❯❯ /usr/bin/curl --version                                                                                                                                                            ✘ 2 
curl 7.88.1 (x86_64-apple-darwin22.0) libcurl/7.88.1 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.11 nghttp2/1.51.0
Release-Date: 2023-02-20
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS GSS-API HSTS HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz MultiSSL NTLM NTLM_WB SPNEGO SSL threadsafe UnixSockets
<!-- gh-comment-id:1581135531 --> @seidnerj commented on GitHub (Jun 7, 2023): Also, potentially related issue (which might be related to some other issues I'm seeing): when running a cURL request through Proxyman to a URL that returns a gzip encoded response, the response is returned unencoded, but when not specifying Proxyman as a proxy server to cURL, you get binary output. Here is an example. The next command returns unencoded output: ``` curl 'https://www.amazon.com/gp/aw/c' \ -H 'Host: www.amazon.com' \ -H 'user-agent: Mozilla/5.0 (iPhone; CPU iPhone OS 16_5} like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148' \ -H 'accept-language: en-US,en;q=0.9' \ --cookie 'x-main="4Z1Mzz53uzeMicHDK1GT0lSGil5f2Hx29rWundALnER8uCukLfK1ep0@Si2H1mVZ"' \ --proxy http://localhost:9090 ``` `<!doctype html><html lang="en-us" class="a-no-js a-touch ....` Whereas this (simply omitting the proxy), returns binary output: ``` curl 'https://www.amazon.com/gp/aw/c' \ -H 'Host: www.amazon.com' \ -H 'user-agent: Mozilla/5.0 (iPhone; CPU iPhone OS 16_5} like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148' \ -H 'accept-language: en-US,en;q=0.9' \ --cookie 'x-main="4Z1Mzz53uzeMicHDK1GT0lSGil5f2Hx29rWundALnER8uCukLfK1ep0@Si2H1mVZ"' ``` ``` Warning: Binary output can mess up your terminal. Use "--output -" to tell Warning: curl to output it to your terminal anyway, or consider "--output Warning: <FILE>" to save to a file. ``` I am using the following version of cURL: ``` ~ ❯❯❯ /usr/bin/curl --version ✘ 2 curl 7.88.1 (x86_64-apple-darwin22.0) libcurl/7.88.1 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.11 nghttp2/1.51.0 Release-Date: 2023-02-20 Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp Features: alt-svc AsynchDNS GSS-API HSTS HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz MultiSSL NTLM NTLM_WB SPNEGO SSL threadsafe UnixSockets ```
Author
Owner

@seidnerj commented on GitHub (Jun 7, 2023):

More info on the above, this is the difference between the request going through Proxyman and the one that does not.

Through Proxyman:

   Trying 127.0.0.1:9090...
* Connected to localhost (127.0.0.1) port 9090 (#0)
* allocate connect buffer
* Establish HTTP proxy tunnel to www.amazon.com:443
> CONNECT www.amazon.com:443 HTTP/1.1
> Host: www.amazon.com:443
> User-Agent: curl/7.88.1
> Proxy-Connection: Keep-Alive
> 
< HTTP/1.1 200 Connection Established
< Content-Length: 0
* Ignoring Content-Length in CONNECT 200 response
< 
* CONNECT phase completed
* CONNECT tunnel established, response 200
* ALPN: offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
*  CAfile: /etc/ssl/cert.pem
*  CApath: none
* (304) (IN), TLS handshake, Server hello (2):
* (304) (IN), TLS handshake, Unknown (8):
* (304) (IN), TLS handshake, Certificate (11):
* (304) (IN), TLS handshake, CERT verify (15):
* (304) (IN), TLS handshake, Finished (20):
* (304) (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256
* ALPN: server did not agree on a protocol. Uses default.
* Server certificate:
*  subject: C=US; L=Wilmington; O=Proxyman LLC; CN=www.amazon.com; ST=Delaware
*  start date: Jun  7 12:23:02 2023 GMT
*  expire date: Jul  8 12:23:02 2024 GMT
*  subjectAltName: host "www.amazon.com" matched cert's "www.amazon.com"
*  issuer: C=US; L=Wilmington; O=Proxyman LLC; CN=Proxyman CA (19 Apr 2023, macbook-pro-16.local); OU=https://proxyman.io; ST=Delaware
*  SSL certificate verify ok.
* using HTTP/1.x
> GET /gp/aw/c HTTP/1.1
> Host: www.amazon.com
> Accept: */*
> Cookie: at-main=Atza|IwEBIKV4oEO6QN6tXrkQ0nW5XQgCy-fHn_EUgIn4IsuTMSMqIDU_f...."
> User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 16_5} like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148
> Accept-Language: en-US,en;q=0.9
> 
< HTTP/1.1 200 OK
< Accept-CH-Lifetime: 86400
< Accept-CH: ect,rtt,downlink,device-memory,sec-ch-device-memory,viewport-width,sec-ch-viewport-width,dpr,sec-ch-dpr
< Cache-Control: no-cache, no-store, must-revalidate, max-age=0
< Connection: keep-alive
< Content-Language: en-US
< content-security-policy-report-only: default-src 'self' blob: https: data: mediastream: 'unsafe-eval' 'unsafe-inline';report-uri https://metrics.media-amazon.com/
< Content-Security-Policy: upgrade-insecure-requests;report-uri https://metrics.media-amazon.com/
< Content-Type: text/html;charset=UTF-8
< Date: Wed, 07 Jun 2023 17:00:21 GMT
< Expires: -1
< Pragma: no-cache
< Server: Server
< Set-Cookie: session-token="hZaoPx6FXPufwTH2nDgPJduxHjK6OyTqxMznqd61GhFEyYY5sNmuxbIQkPI+...; Version=1; Domain=.amazon.com; Max-Age=31536000; Expires=Thu, 06-Jun-2024 17:00:21 GMT; Path=/; Secure
< Strict-Transport-Security: max-age=47474747; includeSubDomains; preload
< transfer-encoding: chunked
< Vary: Content-Type,Accept-Encoding,User-Agent
< x-amz-rid: FG309ZKDP3VQC53KWGYZ
< X-Content-Type-Options: nosniff
< X-Frame-Options: SAMEORIGIN
< X-XSS-Protection: 1;
< Connection: Transfer-Encoding
< 
<!doctype html><html lang="en-us" class="a-no-js a-touch a-mobile" data-19ax5a9jf="mongoose"><!-- sp:feature:head-start -->
...
</div></body></html>
<!--       _
       .__(.)< (MEOW)
        \___)   
 ~~~~~~~~~~~~~~~~~~-->
* Connection #0 to host localhost left intact

Without Proxyman:

   Trying 65.9.104.215:443...
* Connected to www.amazon.com (65.9.104.215) port 443 (#0)
* ALPN: offers http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
*  CAfile: /etc/ssl/cert.pem
*  CApath: none
* (304) (IN), TLS handshake, Server hello (2):
* (304) (IN), TLS handshake, Unknown (8):
* (304) (IN), TLS handshake, Certificate (11):
* (304) (IN), TLS handshake, CERT verify (15):
* (304) (IN), TLS handshake, Finished (20):
* (304) (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / AEAD-AES128-GCM-SHA256
* ALPN: server accepted http/1.1
* Server certificate:
*  subject: CN=www.amazon.com
*  start date: Jan 17 00:00:00 2023 GMT
*  expire date: Jan 16 23:59:59 2024 GMT
*  subjectAltName: host "www.amazon.com" matched cert's "www.amazon.com"
*  issuer: C=US; O=DigiCert Inc; CN=DigiCert Global CA G2
*  SSL certificate verify ok.
* using HTTP/1.1
> GET /gp/aw/c HTTP/1.1
> Host: www.amazon.com
> Accept: */*
> Cookie: at-main=Atza|IwEBIKV4oEO6QN6tXrkQ0nW5XQg...."
> User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 16_5} like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148
> Accept-Language: en-US,en;q=0.9
> 
< HTTP/1.1 200 OK
< Accept-CH-Lifetime: 86400
< Accept-CH: ect,rtt,downlink,device-memory,sec-ch-device-memory,viewport-width,sec-ch-viewport-width,dpr,sec-ch-dpr
< Cache-Control: no-cache, no-store, must-revalidate, max-age=0
< Connection: keep-alive
< Content-Language: en-US
< content-security-policy-report-only: default-src 'self' blob: https: data: mediastream: 'unsafe-eval' 'unsafe-inline';report-uri https://metrics.media-amazon.com/
< Content-Security-Policy: upgrade-insecure-requests;report-uri https://metrics.media-amazon.com/
< Content-Type: text/html;charset=UTF-8
< Date: Wed, 07 Jun 2023 17:04:52 GMT
< Expires: -1
< Pragma: no-cache
< Server: Server
< set-cookie: session-token="3+TLhtwYhn0wx6og/E2lcrSGfpW6ZV03J559uHOnNEDPhXNh16hXEdluz7sndrLc4Q+...."; Version=1; Domain=.amazon.com; Max-Age=31536000; Expires=Thu, 06-Jun-2024 17:04:52 GMT; Path=/; Secure
< Strict-Transport-Security: max-age=47474747; includeSubDomains; preload
< Transfer-Encoding: chunked
< Vary: Content-Type,Accept-Encoding,User-Agent
< x-amz-rid: F30J6F5TTJCMNGSWQSRN
< X-Content-Type-Options: nosniff
< X-Frame-Options: SAMEORIGIN
< X-XSS-Protection: 1;
< X-Cache: Miss from cloudfront
< Via: 1.1 b12493f4f82b360a236f87474564427a.cloudfront.net (CloudFront)
< X-Amz-Cf-Id: Ird1PIInp_HMTugma1KECaIHWElk0ly7BkGs5-8zxnghLsNxq8zFvg==
< X-Amz-Cf-Pop: TLV50-C2
< Content-Encoding: gzip

< 
Warning: Binary output can mess up your terminal. Use "--output -" to tell 
Warning: curl to output it to your terminal anyway, or consider "--output 
Warning: <FILE>" to save to a file.
* Failure writing output to destination
* Failed reading the chunked-encoded stream
* Closing connection 0 

As can bee seen, the request that does not go through Proxyman returns with "Content-Encoding: gzip". Unclear why would going through a proxy change the response by the server. Thoughts?

<!-- gh-comment-id:1581230426 --> @seidnerj commented on GitHub (Jun 7, 2023): More info on the above, this is the difference between the request going through Proxyman and the one that does not. Through Proxyman: ``` Trying 127.0.0.1:9090... * Connected to localhost (127.0.0.1) port 9090 (#0) * allocate connect buffer * Establish HTTP proxy tunnel to www.amazon.com:443 > CONNECT www.amazon.com:443 HTTP/1.1 > Host: www.amazon.com:443 > User-Agent: curl/7.88.1 > Proxy-Connection: Keep-Alive > < HTTP/1.1 200 Connection Established < Content-Length: 0 * Ignoring Content-Length in CONNECT 200 response < * CONNECT phase completed * CONNECT tunnel established, response 200 * ALPN: offers h2,http/1.1 * (304) (OUT), TLS handshake, Client hello (1): * CAfile: /etc/ssl/cert.pem * CApath: none * (304) (IN), TLS handshake, Server hello (2): * (304) (IN), TLS handshake, Unknown (8): * (304) (IN), TLS handshake, Certificate (11): * (304) (IN), TLS handshake, CERT verify (15): * (304) (IN), TLS handshake, Finished (20): * (304) (OUT), TLS handshake, Finished (20): * SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256 * ALPN: server did not agree on a protocol. Uses default. * Server certificate: * subject: C=US; L=Wilmington; O=Proxyman LLC; CN=www.amazon.com; ST=Delaware * start date: Jun 7 12:23:02 2023 GMT * expire date: Jul 8 12:23:02 2024 GMT * subjectAltName: host "www.amazon.com" matched cert's "www.amazon.com" * issuer: C=US; L=Wilmington; O=Proxyman LLC; CN=Proxyman CA (19 Apr 2023, macbook-pro-16.local); OU=https://proxyman.io; ST=Delaware * SSL certificate verify ok. * using HTTP/1.x > GET /gp/aw/c HTTP/1.1 > Host: www.amazon.com > Accept: */* > Cookie: at-main=Atza|IwEBIKV4oEO6QN6tXrkQ0nW5XQgCy-fHn_EUgIn4IsuTMSMqIDU_f...." > User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 16_5} like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 > Accept-Language: en-US,en;q=0.9 > < HTTP/1.1 200 OK < Accept-CH-Lifetime: 86400 < Accept-CH: ect,rtt,downlink,device-memory,sec-ch-device-memory,viewport-width,sec-ch-viewport-width,dpr,sec-ch-dpr < Cache-Control: no-cache, no-store, must-revalidate, max-age=0 < Connection: keep-alive < Content-Language: en-US < content-security-policy-report-only: default-src 'self' blob: https: data: mediastream: 'unsafe-eval' 'unsafe-inline';report-uri https://metrics.media-amazon.com/ < Content-Security-Policy: upgrade-insecure-requests;report-uri https://metrics.media-amazon.com/ < Content-Type: text/html;charset=UTF-8 < Date: Wed, 07 Jun 2023 17:00:21 GMT < Expires: -1 < Pragma: no-cache < Server: Server < Set-Cookie: session-token="hZaoPx6FXPufwTH2nDgPJduxHjK6OyTqxMznqd61GhFEyYY5sNmuxbIQkPI+...; Version=1; Domain=.amazon.com; Max-Age=31536000; Expires=Thu, 06-Jun-2024 17:00:21 GMT; Path=/; Secure < Strict-Transport-Security: max-age=47474747; includeSubDomains; preload < transfer-encoding: chunked < Vary: Content-Type,Accept-Encoding,User-Agent < x-amz-rid: FG309ZKDP3VQC53KWGYZ < X-Content-Type-Options: nosniff < X-Frame-Options: SAMEORIGIN < X-XSS-Protection: 1; < Connection: Transfer-Encoding < <!doctype html><html lang="en-us" class="a-no-js a-touch a-mobile" data-19ax5a9jf="mongoose"><!-- sp:feature:head-start --> ... </div></body></html> <!-- _ .__(.)< (MEOW) \___) ~~~~~~~~~~~~~~~~~~--> * Connection #0 to host localhost left intact ``` Without Proxyman: ``` Trying 65.9.104.215:443... * Connected to www.amazon.com (65.9.104.215) port 443 (#0) * ALPN: offers http/1.1 * (304) (OUT), TLS handshake, Client hello (1): * CAfile: /etc/ssl/cert.pem * CApath: none * (304) (IN), TLS handshake, Server hello (2): * (304) (IN), TLS handshake, Unknown (8): * (304) (IN), TLS handshake, Certificate (11): * (304) (IN), TLS handshake, CERT verify (15): * (304) (IN), TLS handshake, Finished (20): * (304) (OUT), TLS handshake, Finished (20): * SSL connection using TLSv1.3 / AEAD-AES128-GCM-SHA256 * ALPN: server accepted http/1.1 * Server certificate: * subject: CN=www.amazon.com * start date: Jan 17 00:00:00 2023 GMT * expire date: Jan 16 23:59:59 2024 GMT * subjectAltName: host "www.amazon.com" matched cert's "www.amazon.com" * issuer: C=US; O=DigiCert Inc; CN=DigiCert Global CA G2 * SSL certificate verify ok. * using HTTP/1.1 > GET /gp/aw/c HTTP/1.1 > Host: www.amazon.com > Accept: */* > Cookie: at-main=Atza|IwEBIKV4oEO6QN6tXrkQ0nW5XQg...." > User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 16_5} like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 > Accept-Language: en-US,en;q=0.9 > < HTTP/1.1 200 OK < Accept-CH-Lifetime: 86400 < Accept-CH: ect,rtt,downlink,device-memory,sec-ch-device-memory,viewport-width,sec-ch-viewport-width,dpr,sec-ch-dpr < Cache-Control: no-cache, no-store, must-revalidate, max-age=0 < Connection: keep-alive < Content-Language: en-US < content-security-policy-report-only: default-src 'self' blob: https: data: mediastream: 'unsafe-eval' 'unsafe-inline';report-uri https://metrics.media-amazon.com/ < Content-Security-Policy: upgrade-insecure-requests;report-uri https://metrics.media-amazon.com/ < Content-Type: text/html;charset=UTF-8 < Date: Wed, 07 Jun 2023 17:04:52 GMT < Expires: -1 < Pragma: no-cache < Server: Server < set-cookie: session-token="3+TLhtwYhn0wx6og/E2lcrSGfpW6ZV03J559uHOnNEDPhXNh16hXEdluz7sndrLc4Q+...."; Version=1; Domain=.amazon.com; Max-Age=31536000; Expires=Thu, 06-Jun-2024 17:04:52 GMT; Path=/; Secure < Strict-Transport-Security: max-age=47474747; includeSubDomains; preload < Transfer-Encoding: chunked < Vary: Content-Type,Accept-Encoding,User-Agent < x-amz-rid: F30J6F5TTJCMNGSWQSRN < X-Content-Type-Options: nosniff < X-Frame-Options: SAMEORIGIN < X-XSS-Protection: 1; < X-Cache: Miss from cloudfront < Via: 1.1 b12493f4f82b360a236f87474564427a.cloudfront.net (CloudFront) < X-Amz-Cf-Id: Ird1PIInp_HMTugma1KECaIHWElk0ly7BkGs5-8zxnghLsNxq8zFvg== < X-Amz-Cf-Pop: TLV50-C2 < Content-Encoding: gzip < Warning: Binary output can mess up your terminal. Use "--output -" to tell Warning: curl to output it to your terminal anyway, or consider "--output Warning: <FILE>" to save to a file. * Failure writing output to destination * Failed reading the chunked-encoded stream * Closing connection 0 ``` As can bee seen, the request that does not go through Proxyman returns with "Content-Encoding: gzip". Unclear why would going through a proxy change the response by the server. Thoughts?
Author
Owner

@NghiaTranUIT commented on GitHub (Jun 8, 2023):

It's our decision to remove these headers: accept-encoding and content-encoding from the Request. The reason is: Many users would like to see the Response Body in plain text from their Terminal.

If the cURL has these headers, the response body is:

< 
Warning: Binary output can mess up your terminal. Use "--output -" to tell 
Warning: curl to output it to your terminal anyway, or consider "--output 
Warning: <FILE>" to save to a file.

which is hard to see the Content.


I guess, I would add an option into the Setting, so it doesn't omit any headers.

<!-- gh-comment-id:1582110546 --> @NghiaTranUIT commented on GitHub (Jun 8, 2023): It's our decision to remove these headers: `accept-encoding` and `content-encoding` from the Request. The reason is: Many users would like to see the Response Body in plain text from their Terminal. If the cURL has these headers, the response body is: ``` < Warning: Binary output can mess up your terminal. Use "--output -" to tell Warning: curl to output it to your terminal anyway, or consider "--output Warning: <FILE>" to save to a file. ``` which is hard to see the Content. ------------ I guess, I would add an option into the Setting, so it doesn't omit any headers.
Author
Owner

@seidnerj commented on GitHub (Jun 8, 2023):

The thing is, when you're trying to replicate behavior already seen by using cURL, you expect the same result. Not including this header can not only change the encoding by the server, but can also affect the actual content and/or flow that follows. It depends on what is the logic implemented by the server.

I highly recommended that by default this replicates the exact request.

Thank you for your consideration.

It's our decision to remove these headers: accept-encoding and content-encoding from the Request. The reason is: Many users would like to see the Response Body in plain text from their Terminal.

If the cURL has these headers, the response body is:


< 

Warning: Binary output can mess up your terminal. Use "--output -" to tell 

Warning: curl to output it to your terminal anyway, or consider "--output 

Warning: <FILE>" to save to a file.

which is hard to see the Content.


I guess, I would add an option into the Setting, so it doesn't omit any headers.

<!-- gh-comment-id:1582174908 --> @seidnerj commented on GitHub (Jun 8, 2023): The thing is, when you're trying to replicate behavior already seen by using cURL, you expect the same result. Not including this header can not only change the encoding by the server, but can also affect the actual content and/or flow that follows. It depends on what is the logic implemented by the server. I highly recommended that by default this replicates the exact request. Thank you for your consideration. > It's our decision to remove these headers: `accept-encoding` and `content-encoding` from the Request. The reason is: Many users would like to see the Response Body in plain text from their Terminal. > > > > If the cURL has these headers, the response body is: > > ``` > > < > > Warning: Binary output can mess up your terminal. Use "--output -" to tell > > Warning: curl to output it to your terminal anyway, or consider "--output > > Warning: <FILE>" to save to a file. > > ``` > > which is hard to see the Content. > > > > ------------ > > I guess, I would add an option into the Setting, so it doesn't omit any headers.
Author
Owner

@NghiaTranUIT commented on GitHub (Jun 9, 2023):

Thanks @seidnerj I will put this flag in the next release 👍

<!-- gh-comment-id:1584209738 --> @NghiaTranUIT commented on GitHub (Jun 9, 2023): Thanks @seidnerj I will put this flag in the next release 👍
Author
Owner

@seidnerj commented on GitHub (Jun 9, 2023):

Many thanks!

<!-- gh-comment-id:1584287516 --> @seidnerj commented on GitHub (Jun 9, 2023): Many thanks!
Author
Owner

@NghiaTranUIT commented on GitHub (Jun 10, 2023):

@seidnerj you can try this Beta build: https://download.proxyman.io/beta/Proxyman_4.8.0_Support_cURL_Encoding_Headers.dmg

You can disable it in the Setting -> Tool -> Remove Encoding Header. It's ON by default to avoid breaking the current behavior.

CleanShot 2023-06-10 at 14 38 35@2x

<!-- gh-comment-id:1585559249 --> @NghiaTranUIT commented on GitHub (Jun 10, 2023): @seidnerj you can try this Beta build: https://download.proxyman.io/beta/Proxyman_4.8.0_Support_cURL_Encoding_Headers.dmg You can disable it in the Setting -> Tool -> Remove Encoding Header. It's ON by default to avoid breaking the current behavior. ![CleanShot 2023-06-10 at 14 38 35@2x](https://github.com/ProxymanApp/Proxyman/assets/5878421/4ae2ba54-7863-4e72-a659-a6d294b69743)
Author
Owner

@seidnerj commented on GitHub (Jun 10, 2023):

You are awesome! Really appreciate the responsiveness with everything! This in part is what makes Proxyman a truly amazing product. Keep up the good work!

<!-- gh-comment-id:1585560081 --> @seidnerj commented on GitHub (Jun 10, 2023): You are awesome! Really appreciate the responsiveness with everything! This in part is what makes Proxyman a truly amazing product. Keep up the good work!
Author
Owner

@seidnerj commented on GitHub (Jun 10, 2023):

I think it would be good to consider whether this setting should be something like "preserve original request" which will have an effect on all headers as well as other aspects that might be related.

Right now this option is very specific and there's already another option that changes the original request ("add content-length").

That's just my 2 cents.

<!-- gh-comment-id:1585565587 --> @seidnerj commented on GitHub (Jun 10, 2023): I think it would be good to consider whether this setting should be something like "preserve original request" which will have an effect on all headers as well as other aspects that might be related. Right now this option is very specific and there's already another option that changes the original request ("add content-length"). That's just my 2 cents.
Author
Owner

@NghiaTranUIT commented on GitHub (Jun 11, 2023):

It's a really good suggestion @seidnerj. I'm going to refactor this way 👍

<!-- gh-comment-id:1585985909 --> @NghiaTranUIT commented on GitHub (Jun 11, 2023): It's a really good suggestion @seidnerj. I'm going to refactor this way 👍
Author
Owner

@NghiaTranUIT commented on GitHub (Jun 11, 2023):

I took your advice, and here is the new Beta: https://download.proxyman.io/beta/Proxyman_4.8.0_Use_new_option_for_cURL.dmg

Thanks again 👍

CleanShot 2023-06-11 at 10 40 10@2x

<!-- gh-comment-id:1585995918 --> @NghiaTranUIT commented on GitHub (Jun 11, 2023): I took your advice, and here is the new Beta: https://download.proxyman.io/beta/Proxyman_4.8.0_Use_new_option_for_cURL.dmg Thanks again 👍 ![CleanShot 2023-06-11 at 10 40 10@2x](https://github.com/ProxymanApp/Proxyman/assets/5878421/c5eac0ae-fb43-4c79-91b8-a090c5d44bab)
Author
Owner

@seidnerj commented on GitHub (Jun 11, 2023):

That’s great! Many thanks 🚀

<!-- gh-comment-id:1586016006 --> @seidnerj commented on GitHub (Jun 11, 2023): That’s great! Many thanks 🚀
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Proxyman#1662
No description provided.