mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
Added missing PUT logic, now Dropbox works too.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2052 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
8006481b2d
commit
9a6e7780c7
1 changed files with 2 additions and 2 deletions
|
@ -404,7 +404,7 @@ namespace GreenshotPlugin.Core {
|
|||
IDictionary<string, string> requestParameters = null;
|
||||
// Add oAuth values as HTTP headers, if this is allowed
|
||||
StringBuilder authHeader = null;
|
||||
if (HTTPMethod.POST == method && UseHTTPHeadersForAuthorization) {
|
||||
if ((HTTPMethod.POST == method || HTTPMethod.PUT == method) && UseHTTPHeadersForAuthorization) {
|
||||
authHeader = new StringBuilder();
|
||||
requestParameters = new Dictionary<string, string>();
|
||||
foreach (string parameterKey in parameters.Keys) {
|
||||
|
@ -440,7 +440,7 @@ namespace GreenshotPlugin.Core {
|
|||
webRequest.Headers.Add("Authorization: OAuth " + authHeader.ToString());
|
||||
}
|
||||
|
||||
if (HTTPMethod.POST == method && postData == null && requestParameters != null && requestParameters.Count > 0) {
|
||||
if ( (HTTPMethod.POST == method || HTTPMethod.PUT == method) && postData == null && requestParameters != null && requestParameters.Count > 0) {
|
||||
StringBuilder form = new StringBuilder();
|
||||
foreach (string parameterKey in requestParameters.Keys) {
|
||||
form.AppendFormat(System.Globalization.CultureInfo.InvariantCulture, "{0}={1}&", UrlEncode3986(parameterKey), UrlEncode3986(parameters[parameterKey]));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue