From: syo68k Date: Tue, 5 Oct 2010 16:44:35 +0000 (+0000) Subject: 値を持たずキー名のみのパラメータを渡せるようにした(ex. http://exaple.com/index.cgi?hoge ) X-Git-Tag: Tween_v0.9.6.0~21 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=291b2510c1d8880bc6db1f2163c643c313d9902a;p=opentween%2Fopen-tween.git 値を持たずキー名のみのパラメータを渡せるようにした(ex. exaple.com/index.cgi?hoge ) git-svn-id: http://svn.sourceforge.jp/svnroot/tween/trunk@938 e39ad16e-3079-482e-bb30-4b4d378143b6 --- diff --git a/Tween/Connection/HttpConnection.vb b/Tween/Connection/HttpConnection.vb index 4ea55f36..7dc2ffeb 100644 --- a/Tween/Connection/HttpConnection.vb +++ b/Tween/Connection/HttpConnection.vb @@ -463,7 +463,11 @@ Public Class HttpConnection Dim query As New StringBuilder For Each key As String In param.Keys - query.AppendFormat("{0}={1}&", UrlEncode(key), UrlEncode(param(key))) + If String.IsNullOrEmpty(param(key)) Then + query.AppendFormat("{0}&", UrlEncode(key)) + Else + query.AppendFormat("{0}={1}&", UrlEncode(key), UrlEncode(param(key))) + End If Next Return query.ToString(0, query.Length - 1) End Function