Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7937009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T22:24:01+00:00 2026-06-03T22:24:01+00:00

I can upload a file to my Apache web server using Curl just fine:

  • 0

I can upload a file to my Apache web server using Curl just fine:

echo "[$(date)] file contents." | curl -T - http://WEB-SERVER/upload/sample.put 

However, if I put a Squid proxy server in between, then I am not able to:

echo "[$(date)] file contents." | curl -x http://SQUID-PROXY:3128 -T - http://WEB-SERVER/upload/sample.put 

Curl reports the following error:

Note: This error response was in HTML format, but I’ve removed the tags for ease of reading.

ERROR: The requested URL could not be retrieved

ERROR
The requested URL could not be retrieved

While trying to retrieve the URL:
http://WEB-SERVER/upload/sample.put

The following error was encountered:
Unsupported Request Method and Protocol

Squid does not support all request methods for all access protocols.
For example, you can not POST a Gopher request.
Your cache administrator is root. 

My squid.conf doesn’t seem to be having any ACL/rule that should disallow based on the src or dst IP addresses, or the protocol, or the HTTP method… as I can do an HTTP POST just fine between the same client and the web server, with the same proxy sitting in between.

In case of the failing HTTP PUT case, to see the request and response traffic that was actually occurring, I placed a netcat process in between Curl and Squid, and this is what I saw:

Request:

PUT http://WEB-SERVER/upload/sample.put HTTP/1.1
User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
Host: WEB-SERVER
Pragma: no-cache
Accept: */*
Proxy-Connection: Keep-Alive
Transfer-Encoding: chunked
Expect: 100-continue

Response:

HTTP/1.0 501 Not Implemented
Server: squid/2.6.STABLE21
Date: Sun, 13 May 2012 02:11:39 GMT
Content-Type: text/html
Content-Length: 1078
Expires: Sun, 13 May 2012 02:11:39 GMT
X-Squid-Error: ERR_UNSUP_REQ 0
X-Cache: MISS from SQUID-PROXY-FQDN
X-Cache-Lookup: NONE from SQUID-PROXY-FQDN:3128
Via: 1.0 SQUID-PROXY-FQDN:3128 (squid/2.6.STABLE21)
Proxy-Connection: close

<SNIPPED the HTML error response already shown earlier above>

Note: I have anonymized the IP addresses and server names throughout for readability reasons.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T22:24:08+00:00Added an answer on June 3, 2026 at 10:24 pm

    Thanks to Amos Jeffries for answering this on squid-users forum. The issue is basically that Squid before version 3.1 does not implement HTTP 1.1 and thus rejects the chunked transfer encoding.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I do multipart file uploads using the Apache Camel HTTP component ?
How can I upload a File (graphic, audio and video file) with Android using
How can one best test a controller action which receives a file upload using
I'm working on a HTTP file upload client, but I can't seem to get
I have implemented fileupload functionality using apache commons file upload library and implemented logic
I'm using Apache Commons' FTPClient to talk to an FTP server and upload some
I've got the following code for a file upload with Apache's HTTP-Client (org.apache.http.client): public
I'm trying to upload large file (>100Mb) using Apache commons-net FTP library to Secure
I've written a Servlet that handles file uploads using the Apache commons file upload
I need to upload a file using ftp or http. I checked downloading from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.