Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am trying to download a file from a url using curl:

$ curl -3 -v "https://atl1mmsget.msg.eng.t-mobile.com/mms/wapenc?location=XXXXXXXXXXX_14zbwk&rid=027"

Where the X is a digit in the phone number of the device I am testing on.

but I am running into an error:

* Adding handle: conn: 0x2140cd0
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x2140cd0) send_pipe: 1, recv_pipe: 0
* About to connect() to atl1mmsget.msg.eng.t-mobile.com port 443 (#0)
*   Trying 66.94.0.188...
* Connected to atl1mmsget.msg.eng.t-mobile.com (66.94.0.188) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: none
  CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using AES128-SHA
* Server certificate:
*    subject: C=US; ST=Washington; L=Bothell; O=T-Mobile USA, Inc.; CN=apgw.sipgeo.t-mobile.com
*    start date: 2013-05-21 21:02:44 GMT
*    expire date: 2014-05-22 08:35:43 GMT
*    subjectAltName: atl1mmsget.msg.eng.t-mobile.com matched
*    issuer: C=US; O=Entrust, Inc.; OU=www.entrust.net/rpa is incorporated by reference; OU=(c) 2009 Entrust, Inc.; CN=Entrust Certification Authority - L1C
*    SSL certificate verify ok.
> GET /mms/wapenc?location=18188257544_14zbwk&rid=027 HTTP/1.1
> User-Agent: curl/7.32.0
> Host: atl1mmsget.msg.eng.t-mobile.com
> Accept: */*
> 
* HTTP 1.0, assume close after body
< HTTP/1.0 501 Not Implemented
< Server: BigIP
* HTTP/1.0 connection set to keep alive!
< Connection: Keep-Alive
< Content-Length: 0
< 
* Connection #0 to host atl1mmsget.msg.eng.t-mobile.com left intact`

What does the 501 not implemented error mean? How can I get around this?

share|improve this question
    
My bet would be that it blocks based on the User-Agent, try passing a MSIE/Mozilla-like user agent with the -A option. –  Stéphane Chazelas Feb 14 at 7:23
    
Hey @StephaneChazelas, i get the same response when i run curl -3 -v -A Mozilla/5.001 "https://atl1mmsget.msg.eng.t-mobile.com/mms/wapenc?location=18188257544_14zbwk&‌​rid=027" –  toobsco42 Feb 14 at 7:34
    
Have you tried eliminating the -3 from the command line? –  YoMismo Feb 14 at 7:39
    
Yes @YoMismo, I just tried that and got this error * Unknown SSL protocol error in connection to atl1mmsget.msg.eng.t-mobile.com:443 * Closing connection 0 curl: (35) Unknown SSL protocol error in connection to atl1mmsget.msg.eng.t-mobile.com:443 –  toobsco42 Feb 14 at 7:42
    
Ok I tried your url on my browser and I get the exact same error. It is not a curl problem.... Do you get to that url from a previous page where you introduce some credentials? It could be a cookie problem –  YoMismo Feb 14 at 7:48

1 Answer 1

The error code is provided by the server side, not by curl. It is an HTTP error code and the description for that can be found on wikipedia:

501 Not Implemented
The server either does not recognize the request method, or it lacks the 
ability to fulfill the request. Usually this implies future availability 
(e.g., a new feature of a web-service API).

You should try to get access to the functionality with a real browser, to make sure this works (the url you provided doesn't work in my browser). Once that works you can try deleting any cookies to see if accessing the page depends on any of that. You might have to go for something like using selenium if you want to automate accessing that page.

share|improve this answer
    
That sounds pretty reasonable. The problem is I have an mms message on Android and the "content-location" is this url. That is why I am trying to fetch the url to download the content of the MMS. So what are my alternatives? –  toobsco42 Feb 14 at 7:37
    
I am not able to access this url in a browser so that is why I am looking to a unix utility to download the file. –  toobsco42 Feb 14 at 7:43
    
However as you indicate this is for downloading an MMS you might not be able to do this unless you can be identified as the owner of the phone where the MMS was sent to. Is the 18188257544 part of your phone number? Have you ever tried to do this via a normal browser, it might ask you to identify, or identify you use this from a t-online connection (DSL) –  Anthon Feb 14 at 7:44
    
yes that number is from the device that I am testing on. Have I tried to do what via a normal browser? –  toobsco42 Feb 14 at 7:46
    
I am not sure, somehow t-online should check the validity of you accessing that data. The 14zbwk seems a bit minimal for that. Are you using a t-online provided internet access for this? –  Anthon Feb 14 at 7:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.