public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH http-server v2 2/2] remove dead code 'parse_content_disposition'
Date: Mon,  7 Nov 2022 16:07:50 +0100	[thread overview]
Message-ID: <20221107150750.2320248-2-d.csapak@proxmox.com> (raw)
In-Reply-To: <20221107150750.2320248-1-d.csapak@proxmox.com>

our recent change to parsing the upload headers made that code
unnecessary, so remove it

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 src/PVE/APIServer/AnyEvent.pm | 20 --------------------
 1 file changed, 20 deletions(-)

diff --git a/src/PVE/APIServer/AnyEvent.pm b/src/PVE/APIServer/AnyEvent.pm
index 39061ad..f397a8c 100644
--- a/src/PVE/APIServer/AnyEvent.pm
+++ b/src/PVE/APIServer/AnyEvent.pm
@@ -1280,26 +1280,6 @@ sub parse_content_type {
     return  wantarray ? ($ct) : $ct;
 }
 
-sub parse_content_disposition {
-    my ($line) = @_;
-
-    my ($disp, @params) = split(/\s*[;,]\s*/o, $line);
-    my $name;
-    my $filename;
-
-    foreach my $v (@params) {
-	if ($v =~ m/^\s*name\s*=\s*(\S+?)\s*$/o) {
-	    $name = $1;
-	    $name =~ s/^"(.*)"$/$1/;
-	} elsif ($v =~ m/^\s*filename\s*=\s*(.+?)\s*$/o) {
-	    $filename = $1;
-	    $filename =~ s/^"(.*)"$/$1/;
-	}
-    }
-
-    return  wantarray ? ($disp, $name, $filename) : $disp;
-}
-
 my $tmpfile_seq_no = 0;
 
 sub get_upload_filename {
-- 
2.30.2





  reply	other threads:[~2022-11-07 15:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-07 15:07 [pve-devel] [PATCH http-server v2 1/2] upload: allow whitespaces in filenames Dominik Csapak
2022-11-07 15:07 ` Dominik Csapak [this message]
2022-11-07 15:42   ` [pve-devel] applied: [PATCH http-server v2 2/2] remove dead code 'parse_content_disposition' Thomas Lamprecht
2022-11-07 15:42 ` [pve-devel] applied: [PATCH http-server v2 1/2] upload: allow whitespaces in filenames Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221107150750.2320248-2-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal