mirror of
https://github.com/greenshot/greenshot
synced 2025-07-15 09:33:46 -07:00
Small changes: added contentlength to upload and made the UrlEncode3986 public
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2141 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
048826df3d
commit
c0a83c0ee9
2 changed files with 2 additions and 1 deletions
|
@ -391,6 +391,7 @@ namespace GreenshotPlugin.Core {
|
||||||
/// <param name="webRequest"></param>
|
/// <param name="webRequest"></param>
|
||||||
public void Upload(HttpWebRequest webRequest) {
|
public void Upload(HttpWebRequest webRequest) {
|
||||||
webRequest.ContentType = contentType;
|
webRequest.ContentType = contentType;
|
||||||
|
webRequest.ContentLength = fileSize;
|
||||||
using (var requestStream = webRequest.GetRequestStream()) {
|
using (var requestStream = webRequest.GetRequestStream()) {
|
||||||
WriteToStream(requestStream);
|
WriteToStream(requestStream);
|
||||||
}
|
}
|
||||||
|
|
|
@ -225,7 +225,7 @@ namespace GreenshotPlugin.Core {
|
||||||
/// <param name="value">The value to Url encode</param>
|
/// <param name="value">The value to Url encode</param>
|
||||||
/// <returns>Returns a Url encoded string</returns>
|
/// <returns>Returns a Url encoded string</returns>
|
||||||
/// <remarks>This will cause an ignorable CA1055 warning in code analysis.</remarks>
|
/// <remarks>This will cause an ignorable CA1055 warning in code analysis.</remarks>
|
||||||
private static string UrlEncode3986(string value) {
|
public static string UrlEncode3986(string value) {
|
||||||
StringBuilder result = new StringBuilder();
|
StringBuilder result = new StringBuilder();
|
||||||
|
|
||||||
foreach (char symbol in value) {
|
foreach (char symbol in value) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue