Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #92802

Re: Posting gzip'd image file - server says Malformed Upload?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.005
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'subject:file': 0.07; "'rb')": 0.09; 'subject:Posting': 0.09; 'cc:addr:python-list': 0.10; 'server,': 0.15; 'thu,': 0.15; '1:48': 0.16; 'command;': 0.16; "file's": 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'shot.': 0.16; 'still,': 0.16; 'subject:image': 0.16; 'subject:server': 0.16; 'wrote:': 0.16; 'cc:2**0': 0.21; 'cc:addr:python.org': 0.21; 'meant': 0.22; "skip:' 40": 0.22; '2015': 0.23; 'header:In-Reply-To:1': 0.24; 'paul': 0.24; 'message-id:@mail.gmail.com': 0.28; 'certain': 0.31; 'says': 0.32; 'subject:?': 0.34; 'file': 0.34; 'server': 0.34; 'received:google.com': 0.34; 'done': 0.35; 'attempt': 0.35; 'should': 0.37; 'subject:: ': 0.37; 'pm,': 0.39; 'does': 0.39; 'now:': 0.72; 'worth': 0.73; 'chrisa': 0.84; 'to:none': 0.90; 'sitting': 0.93
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=+Stab+ENmZMKZzpzxXZlsVYF57FhuB5QA65Wrr2AlVQ=; b=U7TxAuqk8Ffy33fWS/ZI3SeaMag0idjZ2I45kL/fLgak/hvOmU0zo0xEv46jBiq1VK NHFfpbLC/tZuECl08KIv2tIheroYUT5OaM33/GOoMg4ord5BBENwW897Hi1GhMUnnApD wPC4SpGQnoZ5FIN8HEBdZ1jI/Y4kodmAtWfSFG1wJWFnCBY+s6ygAq1VJIlebf1H0nJn lIDbblt+RfAHdB6CPgU2Cd1I7GyCGPaqFa2GyngBjjV5plGLyas2swd1idnA2r44JZb5 P/tSz8urFz81wkRcOZZCJd6j/aZw+N4k09QttcilipLcA8iqnHiqcjbzlklKpS0JDRKi l5Hw==
MIME-Version 1.0
X-Received by 10.42.249.147 with SMTP id mk19mr3663760icb.26.1434599768689; Wed, 17 Jun 2015 20:56:08 -0700 (PDT)
In-Reply-To <db74b4ee-b88f-4e41-8844-2c80671a6bee@googlegroups.com>
References <59756062-6632-46b4-a92c-aa3a260718a7@googlegroups.com> <mailman.575.1434587009.13271.python-list@python.org> <0dd32144-8969-4e15-9e78-4c9698fb9d8c@googlegroups.com> <mailman.577.1434591971.13271.python-list@python.org> <db74b4ee-b88f-4e41-8844-2c80671a6bee@googlegroups.com>
Date Thu, 18 Jun 2015 13:56:08 +1000
Subject Re: Posting gzip'd image file - server says Malformed Upload?
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.578.1434599772.13271.python-list@python.org> (permalink)
Lines 19
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1434599772 news.xs4all.nl 2837 [2001:888:2000:d::a6]:59432
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:92802

Show key headers only | View raw


On Thu, Jun 18, 2015 at 1:48 PM, Paul Hubert <phbrt25@gmail.com> wrote:
>> # Now:
>> gz = '/Users/Paul/Desktop/scripts/pic.jpg.gz'
>> with open(dafile, 'rb') as f_in, gzip.open(gz, 'wb') as f_out:
>>     f_out.write(f_in.read())
>>
>
> Same result - server says malformed upload. :/

Oh well, was worth a shot. Since the file's sitting around still, you
should be able to attempt to decompress it with the stand-alone gzip
command; does that give the right result? Also, you should be able to
manually send that .gz file up to the server, which would be worth
confirming.

Are you certain that the content should be gzipped as a file? It's not
meant to be done as a transfer-level encoding?

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Posting gzip'd image file - server says Malformed Upload? Paul Hubert <phbrt25@gmail.com> - 2015-06-17 14:55 -0700
  Re: Posting gzip'd image file - server says Malformed Upload? Chris Angelico <rosuav@gmail.com> - 2015-06-18 10:23 +1000
    Re: Posting gzip'd image file - server says Malformed Upload? Paul Hubert <phbrt25@gmail.com> - 2015-06-17 17:45 -0700
      Re: Posting gzip'd image file - server says Malformed Upload? Michael Torrie <torriem@gmail.com> - 2015-06-17 19:10 -0600
      Re: Posting gzip'd image file - server says Malformed Upload? Chris Angelico <rosuav@gmail.com> - 2015-06-18 11:46 +1000
        Re: Posting gzip'd image file - server says Malformed Upload? Paul Hubert <phbrt25@gmail.com> - 2015-06-17 20:48 -0700
          Re: Posting gzip'd image file - server says Malformed Upload? Chris Angelico <rosuav@gmail.com> - 2015-06-18 13:56 +1000
          Re: Posting gzip'd image file - server says Malformed Upload? Michael Torrie <torriem@gmail.com> - 2015-06-17 21:59 -0600
          Re: Posting gzip'd image file - server says Malformed Upload? Laura Creighton <lac@openend.se> - 2015-06-18 23:44 +0200
  Re: Posting gzip'd image file - server says Malformed Upload? random832@fastmail.us - 2015-06-18 08:38 -0400
  Re: Posting gzip'd image file - server says Malformed Upload? Chris Angelico <rosuav@gmail.com> - 2015-06-18 22:42 +1000

csiph-web