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

Fix content length of file parameter #769

Merged

Conversation

dgreenbean
Copy link

Adding required input of content length when adding a file using a writer action.

@dgreenbean dgreenbean force-pushed the feature/add_file_action_content_length branch from 696f018 to 85892db Compare October 22, 2015 18:51
@dgreenbean
Copy link
Author

This is to address issue #742.

@@ -158,9 +158,10 @@ public interface IRestRequest
/// <param name="name">The parameter name to use in the request</param>
/// <param name="writer">A function that writes directly to the stream. Should NOT close the stream.</param>
/// <param name="fileName">The file name to use for the uploaded file</param>
/// <param name="contentLength">The length (in bytes) of the file content.</param>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the spacing difference here.

@hallem
Copy link
Member

hallem commented Nov 2, 2015

Code looks good. Just some minor things that need to be changed first. Also, any idea on why this broke? I haven't looked into it too deeply yet but I'm concerned about changing the method signature and breaking other implementations.

@dgreenbean dgreenbean force-pushed the feature/add_file_action_content_length branch from 85892db to 16f48c0 Compare November 2, 2015 18:15
@dgreenbean
Copy link
Author

I didn't look too closely at why this broke. Since the method is currently broken anyway, I wasn't too concerned about changing the signature. If you think the compiler errors could cause problems for people, I could make this method throw an Exception and add a new method that works. That felt like overkill to me.

@dgreenbean
Copy link
Author

The spacing should be fixed now. I'm guessing at the moment that the AppVeyor failure is unrelated to the change. Please let me know if this is not the case.

@hallem
Copy link
Member

hallem commented Nov 2, 2015

it is unrelated unless it doesn't run successfully locally :)

@dgreenbean
Copy link
Author

@hallem Is there anything blocking this from being merged?

@hallem
Copy link
Member

hallem commented Feb 1, 2016

no i just haven't had time to sit down and work on this. i've recently moved so i'm still dealing with all that. i should have some time soon.

hallem added a commit that referenced this pull request Feb 17, 2016
…nt_length

Fix content length of file parameter
@hallem hallem merged commit 5ffc1f6 into restsharp:master Feb 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants