Skip to content
New issue

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

Allow access to unsanitized file name #800

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

j0hax
Copy link

@j0hax j0hax commented Jan 4, 2024

Hello there! I've come across a situation where I have to save a file with a "double" extension (*.kepub.epub), and the current implementation of (r *Response) FileName() purposefully breaks that by always calling SanitizeFileName().

I propose to provide direct access to an unsanitized file name with the method RawFileName(). This shouldn't affect compatibility and allows for accessing information similar to URL package's RawPath, RawQuery, etc.

@WGH-
Copy link
Collaborator

WGH- commented Mar 14, 2024

Ehm, perhaps, sanitizing double extension away was a mistake in the first place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants