Viewing last 25 versions of post by LostPone in topic Warning: Tumblr randomly serving JPEGs instead of PNGs

LostPone
Solar Supporter - Fought against the New Lunar Republic rebellion on the side of the Solar Deity (April Fools 2023).
Notoriously Divine Tagger - Consistently uploads images above and beyond the minimum tag requirements. And/or additionally, bringing over the original description from the source if the image has one. Does NOT apply to the uploader adding several to a dozen tags after originally uploading with minimum to bare tagging.
Fine Arts - Two hundred uploads with a score of over a hundred (Safe/Suggestive)
Perfect Pony Plot Provider - Uploader of 10+ images with 350 upvotes or more (Questionable/Explicit)

Deactivated account
An update on this to make it even worse: the file you get depends on your location and/or your DNS.


 
I tried to download "[https://68.media.tumblr.com/3cb69a5025052a5190d611d26640a7a9/tumblr_n8u6mwlw1J1rwimero4_1280.png":](https://68.media.tumblr.com/3cb69a5025052a5190d611d26640a7a9/tumblr_n8u6mwlw1J1rwimero4_1280.png) [nsfw] using two different computers, one in Europe, and one in America, and...


 
Europe: [bq]
>
@$ curl -kv https://68.media.tumblr.com/3cb69a5025052a5190d611d26640a7a9/tumblr_n8u6mwlw1J1rwimero4_1280.png 1> /dev/null

>
Trying 77.238.180.14...

>
> GET /3cb69a5025052a5190d611d26640a7a9/tumblr_n8u6mwlw1J1rwimero4_1280.png HTTP/1.1

>
> Host: 68.media.tumblr.com

>
> User-Agent: curl/7.57.0

>
> Accept: **/*
*
>
>
>
< HTTP/1.1 200 OK

>
< Date: Thu, 04 Oct 2018 23:48:49 GMT

>
< Content-Type: image/png

>
< Content-Length: 726715

>
(...)@[/bq]

 
America: [bq]
>
@$ curl -kv https://68.media.tumblr.com/3cb69a5025052a5190d611d26640a7a9/tumblr_n8u6mwlw1J1rwimero4_1280.png 1> /dev/null

>
Trying 69.147.92.13...

>
> GET /3cb69a5025052a5190d611d26640a7a9/tumblr_n8u6mwlw1J1rwimero4_1280.png HTTP/1.1

>
> Host: 68.media.tumblr.com

>
> User-Agent: curl/7.57.0

>
> Accept: **/*
*
>
>
>
< HTTP/1.1 200 OK

>
< Date: Thu, 04 Oct 2018 23:36:22 GMT

>
< Content-Type: image/jpeg

>
< Content-Length: 272440

>
(...)@[/bq]

 
Making the exact same request to the same domain will return different files depending on the IP resolved.


 
It's worth mentioning that making the request to the "right" IP will get the right image. ie, this should get the PNG, no matter where you're making the request.
[bq]@
 

> `
curl -kv https://77.238.180.14/3cb69a5025052a5190d611d26640a7a9/tumblr_n8u6mwlw1J1rwimero4_1280.png -H "Host: 68.media.tumblr.com" -O@[/bq]`
HOWEVER, the @`Host@` header still determines the file that will be received. For example, this will download the JPEG.
[bq]@
 

> `
curl -kv https://77.238.180.14/3cb69a5025052a5190d611d26640a7a9/tumblr_n8u6mwlw1J1rwimero4_1280.png -H "Host: media.tumblr.com" -O@[/bq]`
Needless to say, different images require different values in order to get the PNG, assuming it's even possible to get the PNG (I couldn't find any PNG for the image linked by "@[`St@`SyaN":](/uppers/warning-tumblr-randomly-serving-jpegs-instead-of-pngs/post/4009114#post_4009114) anywhere, for example).


 
*
*tl;dr:** Tumblr is so incredibly broken that, at this moment, it's nearly impossible to know how to get the PNG versions of the images. I was trying to find a good method now that we know that @`a.media.tumblr.com@` doesn't always work, but after this I'm giving up, it's simply not worth it.
 
I just hope Tumblr will reenable _raw images eventually anyway.
No reason given
Edited by LostPone
LostPone
Solar Supporter - Fought against the New Lunar Republic rebellion on the side of the Solar Deity (April Fools 2023).
Notoriously Divine Tagger - Consistently uploads images above and beyond the minimum tag requirements. And/or additionally, bringing over the original description from the source if the image has one. Does NOT apply to the uploader adding several to a dozen tags after originally uploading with minimum to bare tagging.
Fine Arts - Two hundred uploads with a score of over a hundred (Safe/Suggestive)
Perfect Pony Plot Provider - Uploader of 10+ images with 350 upvotes or more (Questionable/Explicit)

Deactivated account
An update on this to make it even worse: the file you get depends on your location and/or your DNS.

I tried to download "https://68.media.tumblr.com/3cb69a5025052a5190d611d26640a7a9/tumblr_n8u6mwlw1J1rwimero4_1280.png":https://68.media.tumblr.com/3cb69a5025052a5190d611d26640a7a9/tumblr_n8u6mwlw1J1rwimero4_1280.png [nsfw] using two different computers, one in Europe, and one in America, and...

Europe: [bq]@$ curl -kv https://68.media.tumblr.com/3cb69a5025052a5190d611d26640a7a9/tumblr_n8u6mwlw1J1rwimero4_1280.png 1> /dev/null
Trying 77.238.180.14...
> GET /3cb69a5025052a5190d611d26640a7a9/tumblr_n8u6mwlw1J1rwimero4_1280.png HTTP/1.1
> Host: 68.media.tumblr.com
> User-Agent: curl/7.57.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Thu, 04 Oct 2018 23:48:49 GMT
< Content-Type: image/png
< Content-Length: 726715
(...)@[/bq]
America: [bq]@$ curl -kv https://68.media.tumblr.com/3cb69a5025052a5190d611d26640a7a9/tumblr_n8u6mwlw1J1rwimero4_1280.png 1> /dev/null
Trying 69.147.92.13...
> GET /3cb69a5025052a5190d611d26640a7a9/tumblr_n8u6mwlw1J1rwimero4_1280.png HTTP/1.1
> Host: 68.media.tumblr.com
> User-Agent: curl/7.57.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Thu, 04 Oct 2018 23:36:22 GMT
< Content-Type: image/jpeg
< Content-Length: 272440
(...)@[/bq]
Making the exact same request to the same domain will return different files depending on the IP resolved.

It's worth mentioning that making the request to the "right" IP will get the right image. ie, this should get the PNG, no matter where you're making the request.
[bq]@curl -kv https://77.238.180.14/3cb69a5025052a5190d611d26640a7a9/tumblr_n8u6mwlw1J1rwimero4_1280.png -H "Host: 68.media.tumblr.com" -O@[/bq] HOWEVER, the @Host@ header still determines the file that will be received. For example, this will download the JPEG.
[bq]@curl -kv https://77.238.180.14/3cb69a5025052a5190d611d26640a7a9/tumblr_n8u6mwlw1J1rwimero4_1280.png -H "Host: media.tumblr.com" -O@[/bq] Needless to say, different images require different values in order to get the PNG, assuming it's even possible to get the PNG (I couldn't find any PNG for the image linked by "@St@SyaN":/uppers/warning-tumblr-randomly-serving-jpegs-instead-of-pngs/post/4009114#post_4009114 anywhere, for example).

*tl;dr:* Tumblr is so incredibly broken that, at this moment, it's nearly impossible to know how to get the PNG versions of the images. I was trying to find a good method now that we know that @a.media.tumblr.com@ doesn't always work, but after this I'm giving up, it's simply not worth it.
I just hope Tumblr will reenable _raw images eventually anyway.
No reason given
Edited by LostPone