We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please fill out the issue checklist below and provide ALL the requested information.
CF_TRACE=1
Describe the bug and the command you saw an issue with
In the getFilenameFromHeader method the "filename=" string is a cutset (a set of characters) to be removed, and not a prefix.
getFilenameFromHeader
cli/cf/util/downloader/file_download.go
Lines 90 to 105 in b5a352a
Fixed function should be like this:
func getFilenameFromHeader(h string) string { if h == "" { return "" } contents := strings.Split(h, ";") for _, content := range contents { content = strings.TrimSpace(content) if strings.HasPrefix(content, "filename=") { name := strings.TrimPrefix(content, "filename=") return strings.Trim(name, `"`) } } return "" }
Exact Steps To Reproduce
Changing line below to "Content-Disposition": []string{"attachment; filename=ameno.zip"},
"Content-Disposition": []string{"attachment; filename=ameno.zip"},
cli/cf/util/downloader/file_download_test.go
Line 85 in b5a352a
and line below to Expect(name).To(Equal("ameno.zip"))
Expect(name).To(Equal("ameno.zip"))
Line 111 in b5a352a
will make the test fail.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Please fill out the issue checklist below and provide ALL the requested information.
CF_TRACE=1
to help debug the issue.Describe the bug and the command you saw an issue with
In the
getFilenameFromHeader
method the "filename=" string is a cutset (a set of characters) to be removed, and not a prefix.cli/cf/util/downloader/file_download.go
Lines 90 to 105 in b5a352a
Fixed function should be like this:
Exact Steps To Reproduce
Changing line below to
"Content-Disposition": []string{"attachment; filename=ameno.zip"},
cli/cf/util/downloader/file_download_test.go
Line 85 in b5a352a
and line below to
Expect(name).To(Equal("ameno.zip"))
cli/cf/util/downloader/file_download_test.go
Line 111 in b5a352a
will make the test fail.
The text was updated successfully, but these errors were encountered: