[Tween-svn] [1493] バージョンチェック失敗対応

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2011年 3月 16日 (水) 19:05:37 JST


Revision: 1493
          http://sourceforge.jp/projects/tween/svn/view?view=rev&revision=1493
Author:   kiri_feather
Date:     2011-03-16 19:05:37 +0900 (Wed, 16 Mar 2011)

Log Message:
-----------
バージョンチェック失敗対応

Modified Paths:
--------------
    trunk/Tween/Connection/HttpVarious.vb
    trunk/Tween/Tween.resx
    trunk/Tween/Tween.vb
    trunk/Tween/Twitter.vb


-------------- next part --------------
Modified: trunk/Tween/Connection/HttpVarious.vb
===================================================================
--- trunk/Tween/Connection/HttpVarious.vb	2011-03-14 09:06:47 UTC (rev 1492)
+++ trunk/Tween/Connection/HttpVarious.vb	2011-03-16 10:05:37 UTC (rev 1493)
@@ -141,7 +141,7 @@
     Public Overloads Function GetData(ByVal Url As String, ByVal param As Dictionary(Of String, String), ByRef content As String, ByVal timeout As Integer, ByRef errmsg As String) As Boolean
         Try
             Dim req As HttpWebRequest = CreateRequest(GetMethod, New Uri(Url), param, False)
-            If timeout < 3000 OrElse timeout > 30000 Then
+            If timeout < 3000 OrElse timeout > 100000 Then
                 req.Timeout = 10000
             Else
                 req.Timeout = timeout
@@ -171,6 +171,7 @@
         Try
             Dim req As HttpWebRequest = CreateRequest(GetMethod, New Uri(Url), Nothing, False)
             req.AutomaticDecompression = DecompressionMethods.Deflate Or DecompressionMethods.GZip
+            req.UserAgent = GetUserAgentString()
             Using strm As New System.IO.FileStream(savePath, IO.FileMode.Create, IO.FileAccess.Write)
                 Try
                     Dim res As HttpStatusCode = Me.GetResponse(req, strm, Nothing, False)

Modified: trunk/Tween/Tween.resx
===================================================================
--- trunk/Tween/Tween.resx	2011-03-14 09:06:47 UTC (rev 1492)
+++ trunk/Tween/Tween.resx	2011-03-16 10:05:37 UTC (rev 1493)
@@ -382,7 +382,7 @@
     <value>0, 0, 0, 0</value>
   </data>
   <data name="ListTab.Size" type="System.Drawing.Size, System.Drawing">
-    <value>570, 205</value>
+    <value>570, 207</value>
   </data>
   <data name="ListTab.TabIndex" type="System.Int32, mscorlib">
     <value>0</value>
@@ -406,7 +406,7 @@
     <value>0, 0</value>
   </data>
   <data name="TimelinePanel.Size" type="System.Drawing.Size, System.Drawing">
-    <value>570, 205</value>
+    <value>570, 207</value>
   </data>
   <data name="TimelinePanel.TabIndex" type="System.Int32, mscorlib">
     <value>0</value>
@@ -436,7 +436,7 @@
     <value>0, 0</value>
   </data>
   <data name="ImageSelectedPicture.Size" type="System.Drawing.Size, System.Drawing">
-    <value>570, 177</value>
+    <value>570, 179</value>
   </data>
   <data name="ImageSelectedPicture.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
     <value>Zoom</value>
@@ -640,7 +640,7 @@
     <value>Bottom</value>
   </data>
   <data name="ImagePathPanel.Location" type="System.Drawing.Point, System.Drawing">
-    <value>0, 177</value>
+    <value>0, 179</value>
   </data>
   <data name="ImagePathPanel.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
     <value>3, 3, 3, 3</value>
@@ -670,7 +670,7 @@
     <value>0, 0</value>
   </data>
   <data name="ImageSelectionPanel.Size" type="System.Drawing.Size, System.Drawing">
-    <value>570, 205</value>
+    <value>570, 207</value>
   </data>
   <data name="ImageSelectionPanel.TabIndex" type="System.Int32, mscorlib">
     <value>1</value>
@@ -697,7 +697,7 @@
     <value>0, 0</value>
   </data>
   <data name="ProfilePanel.Size" type="System.Drawing.Size, System.Drawing">
-    <value>570, 205</value>
+    <value>570, 207</value>
   </data>
   <data name="ProfilePanel.TabIndex" type="System.Int32, mscorlib">
     <value>2</value>
@@ -1051,7 +1051,7 @@
     <value>59, 20</value>
   </data>
   <data name="PostBrowser.Size" type="System.Drawing.Size, System.Drawing">
-    <value>508, 42</value>
+    <value>508, 40</value>
   </data>
   <data name="PostBrowser.TabIndex" type="System.Int32, mscorlib">
     <value>6</value>
@@ -1156,7 +1156,7 @@
     <value>2</value>
   </data>
   <data name="TableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
-    <value>570, 65</value>
+    <value>570, 63</value>
   </data>
   <data name="TableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
     <value>1</value>
@@ -1294,10 +1294,10 @@
     <value>19</value>
   </data>
   <data name="SplitContainer2.Size" type="System.Drawing.Size, System.Drawing">
-    <value>570, 92</value>
+    <value>570, 90</value>
   </data>
   <data name="SplitContainer2.SplitterDistance" type="System.Int32, mscorlib">
-    <value>65</value>
+    <value>63</value>
   </data>
   <data name="SplitContainer2.SplitterWidth" type="System.Int32, mscorlib">
     <value>2</value>
@@ -1339,7 +1339,7 @@
     <value>0, 0</value>
   </data>
   <data name="PreviewPicture.Size" type="System.Drawing.Size, System.Drawing">
-    <value>194, 82</value>
+    <value>194, 92</value>
   </data>
   <data name="PreviewPicture.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
     <value>Zoom</value>
@@ -1369,7 +1369,7 @@
     <value>194, 0</value>
   </data>
   <data name="PreviewScrollBar.Size" type="System.Drawing.Size, System.Drawing">
-    <value>17, 82</value>
+    <value>17, 92</value>
   </data>
   <data name="PreviewScrollBar.TabIndex" type="System.Int32, mscorlib">
     <value>0</value>
@@ -1399,7 +1399,7 @@
     <value>1</value>
   </data>
   <data name="SplitContainer3.Size" type="System.Drawing.Size, System.Drawing">
-    <value>570, 92</value>
+    <value>570, 90</value>
   </data>
   <data name="SplitContainer3.SplitterDistance" type="System.Int32, mscorlib">
     <value>355</value>
@@ -1438,7 +1438,7 @@
     <value>574, 307</value>
   </data>
   <data name="SplitContainer1.SplitterDistance" type="System.Int32, mscorlib">
-    <value>209</value>
+    <value>211</value>
   </data>
   <data name="SplitContainer1.SplitterWidth" type="System.Int32, mscorlib">
     <value>2</value>

Modified: trunk/Tween/Tween.vb
===================================================================
--- trunk/Tween/Tween.vb	2011-03-14 09:06:47 UTC (rev 1492)
+++ trunk/Tween/Tween.vb	2011-03-16 10:05:37 UTC (rev 1493)
@@ -9924,7 +9924,7 @@
                                _itemCacheIndex = -1
                                _postCache = Nothing
                                DirectCast(_curTab.Tag, DetailsListView).Update()
-                               If _curPost.StatusId = id Then DispSelectedPost(True)
+                               If _curPost IsNot Nothing AndAlso _curPost.StatusId = id Then DispSelectedPost(True)
                            End If
                        End Sub)
                 Exit Sub

Modified: trunk/Tween/Twitter.vb
===================================================================
--- trunk/Tween/Twitter.vb	2011-03-14 09:06:47 UTC (rev 1492)
+++ trunk/Tween/Twitter.vb	2011-03-16 10:05:37 UTC (rev 1493)
@@ -1150,7 +1150,9 @@
 #Region "バージョンアップ"
     Public Function GetVersionInfo() As String
         Dim content As String = ""
-        If Not (New HttpVarious).GetData("http://tween.sourceforge.jp/version.txt?" + Now.ToString("yyMMddHHmmss") + Environment.TickCount.ToString(), Nothing, content) Then
+        Dim headers As New Dictionary(Of String, String)
+        headers.Add("User-Agent", GetUserAgentString())
+        If Not (New HttpVarious).GetData("http://tween.sourceforge.jp/version.txt?" + Now.ToString("yyMMddHHmmss") + Environment.TickCount.ToString(), headers, content) Then
             Throw New Exception("GetVersionInfo Failed")
         End If
         Return content



Tween-svn メーリングリストの案内
Back to archive index