Apache makes pk3 a zip?


(d@Ve) #1

Hi,
Ive searched around and cant figure out why my apache turns all the .pk3 files into .zip when u download them. Im runnin a game server for wolfenstein:ET and when you connect, and dont have certain files, you have to download them, obviously. Well the files get downloaded but apache2 is automaticly turnin them into zip files, wich ET doesnt recognize.
Anybody know whats goin on here?


([ToC]Death) #2

pk3 files ARE zip files but with a different extension


(Loffy) #3

[ToC]Death is right. When I release a custom map it will be several folders (maps, scripts, levelshots, textures et cetera) zipped together.

I have windows XP home edition, and winZip. I just select the folders (maps, scripts, levelshots, textures et cetera), right-click and turn them into a zip-file, for example “mynewkillermap.zip” and then I just rename it to “mynewkillermap.pk3”.
(You can do this in reverse: Take any .pk3 and rename it to .zip and unzip it, to take a look inside the pk3.)

//Loffy


(SCDS_reyalP) #4

I think dave is describing a different problem. It sounds like the actual extension is getting set wrong when the downloaded file is saved. ISTR some combinations of web clients and servers doing this (depending on the mime type set by the server, and the clients reaction to it), but I’d be very surpised to see the ET client do that.


(jaybird) #5

Yeah, the webserver has mime issues. I had a nasty one setting up httpd2 a while back that wanted to send .pk3 files as text/plain. Not fun.


(chr0nicles) #6

Windows XP changes the .pk3 in .zip and it does that with more file types, a webserver doesn’t change the extention of a file, and certainly doesn’t have any ‘mime’ issues.


(Sauron|EFG) #7

Maybe you could give us the IP to try it ourselves?


(SCDS_reyalP) #8

The server tells the client what it thinks the content type is, which may in turn cause the client to do something with the name.


(chr0nicles) #9

The server tells the client what it thinks the content type is, which may in turn cause the client to do something with the name.

Correct, but still IE changes the extention in .zip, it shouldn’t even touch the name at all, if i name it .rop it should be .rop and not 'ow this is an archive i’ll change it into * for easy usuage.


(jaybird) #10

Stop using IE. It’s an invite to all sorts of nasty things on the internet anyway.


(kamikazee) #11

Check it with another browser and see if still doesn’t work. If that doesn’t work as well you’ll need to look at which HTTP header the server sends.
There are some commands for your apache.conf which specify what kind of file pk3 is.


(Xipher) #12

It has done it to me in Firefox as well. I think its how browsers deals with the content type heading for files. wget works fine though :slight_smile:


(bani) #13

you want to do something like this to your apache config:

AddEncoding application/octet-stream .pk3

if apache doesn’t recognize the extension, depending on the server setup it may try to guess it by looking at the file header. a pk3 is a zip file so it sends application/zip.