{"thread":{"id":"43741","subject":"[PATCH] gitweb: Don't use Content-Encoding: header in git_snapshot","startedAt":"2006-12-11T17:09:58Z","lastAt":"2006-12-11T17:09:58Z","messageCount":1,"participants":["Jakub Narebski"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"297598","messageId":"11658569982522-git-send-email-jnareb@gmail.com","threadId":"43741","inReplyTo":null,"subject":"[PATCH] gitweb: Don't use Content-Encoding: header in git_snapshot","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-12-11T17:09:58Z","receivedAt":"2006-12-11T17:09:58Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Do not use Content-Encoding: HTTP header in git_snapshot, using\ninstead type according to the snapshot type (compression type).\nSome of web browser take Content-Encoding: to be _transparent_\nalso for downloading, and store decompressed file (with incorrect\ncompression suffix) on download.\n\nSigned-off-by: Jakub Narebski <jnareb@gmail.com>\n---\n gitweb/gitweb.perl |    3 +--\n 1 files changed, 1 insertions(+), 2 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex 7d24c10..040ee71 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -3489,8 +3489,7 @@ sub git_snapshot {\n \tmy $filename = basename($project) . \"-$hash.tar.$suffix\";\n \n \tprint $cgi->header(\n-\t\t-type => 'application/x-tar',\n-\t\t-content_encoding => $ctype,\n+\t\t-type => \"application/$ctype\",\n \t\t-content_disposition => 'inline; filename=\"' . \"$filename\" . '\"',\n \t\t-status => '200 OK');\n \n-- \n1.4.4.1\n"}]}