Skip to content
This repository was archived by the owner on Jan 21, 2026. It is now read-only.

Set the temp file extension based on the content type - #208

Merged
tlmii merged 6 commits into
dotnet:masterfrom
tlmii:dev/temp-file-extension
Sep 5, 2019
Merged

Set the temp file extension based on the content type#208
tlmii merged 6 commits into
dotnet:masterfrom
tlmii:dev/temp-file-extension

Conversation

@tlmii

@tlmii tlmii commented Sep 2, 2019

Copy link
Copy Markdown
Member

Resolves #186.

When the content type we are sending is something known (application/json, application/xml, text/xml currently), we will create a temp file name with the appropriate file extension. If its anything else, we just use the default Path.GetTempFileName().

Comment thread src/Microsoft.HttpRepl/Commands/BaseHttpCommand.cs
Comment thread src/Microsoft.HttpRepl/Properties/AssemblyInfo.cs Outdated
Comment thread src/Microsoft.HttpRepl/FileSystem/RealFileSystem.cs Outdated
Comment thread src/Microsoft.HttpRepl/Resources/Strings.resx Outdated
Comment thread src/Microsoft.HttpRepl.IntegrationTests/FileSystem/RealFileSystemTests.cs Outdated
tlmii and others added 2 commits September 3, 2019 14:45
…equire an extension; pass in .tmp if we can't find a more appropriate one. Also moved a couple integration tests to be unit tests now that there was no file system dependency.
Comment thread src/Microsoft.HttpRepl.Tests/FileSystem/RealFileSystemTests.cs Outdated
Comment thread src/Microsoft.HttpRepl.Tests/FileSystem/RealFileSystemTests.cs Outdated
Comment thread src/Microsoft.HttpRepl/FileSystem/RealFileSystem.cs Outdated
Comment thread src/Microsoft.HttpRepl.Tests/FileSystem/RealFileSystemTests.cs
…sts for the failure conditions, renaming the success conditions
@tlmii
tlmii merged commit 74eb030 into dotnet:master Sep 5, 2019
@tlmii
tlmii deleted the dev/temp-file-extension branch September 5, 2019 21:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

File extension on temp file for body

3 participants