Hello community,

here is the log from the commit of package go-httplib.go for openSUSE:Factory
checked in at Thu Oct 6 17:21:56 CEST 2011.



--------
--- openSUSE:Factory/go-httplib.go/go-httplib.go.changes        2011-09-23 
02:01:32.000000000 +0200
+++ /mounts/work_src_done/STABLE/go-httplib.go/go-httplib.go.changes    
2011-10-06 14:57:58.000000000 +0200
@@ -1,0 +2,6 @@
+Thu Oct  6 12:56:40 UTC 2011 - gra...@andtech.eu
+
+- Synch with upstsream fixes for r60
+- add rpmlintrc (ELF strip/static binary warnings)
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


Old:
----
  httplib.go-0.0.0+git20110624.tar.bz2
  httplib.go-fix-for-weekly-2011.06.23.patch

New:
----
  httplib.go-0.0.0+git20110915.tar.bz2
  rpmlintrc

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ go-httplib.go.spec ++++++
--- /var/tmp/diff_new_pack.UzwfRL/_old  2011-10-06 17:21:42.000000000 +0200
+++ /var/tmp/diff_new_pack.UzwfRL/_new  2011-10-06 17:21:42.000000000 +0200
@@ -19,14 +19,13 @@
 
 
 Name:           go-httplib.go
-Version:        0.0.0+git20110624
+Version:        0.0.0+git20110915
 Release:        1
 Summary:        A simple, low-level http library for Go
 Group:          Development/Languages/Other
 License:        MIT
 Url:            https://github.com/hoisie/httplib.go
 Source0:        httplib.go-%{version}.tar.bz2
-Patch0:         httplib.go-fix-for-weekly-2011.06.23.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  go-devel
 %{go_provides}
@@ -45,15 +44,14 @@
 
 %prep
 %setup -q -n httplib.go
-%patch0 -p1
 
 %build
 
 %install
 %{go_make_install}
 
-#%%check
-#%%{go_make_test}
+%check
+%{go_make_test}
 
 %clean
 rm -rf %{buildroot}

++++++ httplib.go-0.0.0+git20110624.tar.bz2 -> 
httplib.go-0.0.0+git20110915.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/httplib.go/Readme.md new/httplib.go/Readme.md
--- old/httplib.go/Readme.md    2011-06-24 14:18:00.000000000 +0200
+++ new/httplib.go/Readme.md    2011-10-06 14:52:13.000000000 +0200
@@ -1,6 +1,6 @@
 
 ## About
-httplib.go is a simple extension of Go's http client that provides keep-alive 
connections and generic requests.
+httplib.go is a simple extension of Go's http client that provides a nice 
fluid interface for building HTTP requests
 
 ## Usage
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/httplib.go/httplib.go new/httplib.go/httplib.go
--- old/httplib.go/httplib.go   2011-06-24 14:18:00.000000000 +0200
+++ new/httplib.go/httplib.go   2011-10-06 14:52:13.000000000 +0200
@@ -9,6 +9,7 @@
     "net"
     "os"
     "strings"
+    "url"
 )
 
 var defaultUserAgent = "httplib.go"
@@ -17,7 +18,7 @@
 
 type Client struct {
     conn    *http.ClientConn
-    lastURL *http.URL
+    lastURL *url.URL
 }
 
 type nopCloser struct {
@@ -32,8 +33,12 @@
 
 func hasPort(s string) bool { return strings.LastIndex(s, ":") > 
strings.LastIndex(s, "]") }
 
-func newConn(url *http.URL) (*http.ClientConn, os.Error) {
+func newConn(url *url.URL) (*http.ClientConn, os.Error) {
     addr := url.Host
+    //just set the default scheme to http
+    if url.Scheme == "" {
+        url.Scheme = "http"
+    }
     if !hasPort(addr) {
         addr += ":" + url.Scheme
     }
@@ -62,18 +67,27 @@
 }
 
 func getResponse(rawUrl string, req *http.Request) (*http.ClientConn, 
*http.Response, os.Error) {
-    url, err := http.ParseURL(rawUrl)
+    url, err := url.Parse(rawUrl)
+    if url.Scheme == "" {
+        rawUrl = "http://"; + rawUrl
+        url, err = url.Parse(rawUrl)
+    }
+
     if err != nil {
         return nil, nil, err
     }
     req.URL = url
     if debugprint {
-        dump, _ := http.DumpRequest(req, true)
+        dump, err := http.DumpRequest(req, true)
+        if err != nil {
+            println(err.String())
+        }
         print(string(dump))
     }
 
     conn, err := newConn(url)
     if err != nil {
+        println(err.String())
         return nil, nil, err
     }
 
@@ -90,7 +104,7 @@
     var req http.Request
     req.Method = "GET"
     req.Header = http.Header{}
-    req.UserAgent = defaultUserAgent
+    req.Header.Set("User-Agent", defaultUserAgent)
     return &HttpRequestBuilder{url, &req, nil, map[string]string{}}
 }
 
@@ -98,7 +112,7 @@
     var req http.Request
     req.Method = "POST"
     req.Header = http.Header{}
-    req.UserAgent = defaultUserAgent
+    req.Header.Set("User-Agent", defaultUserAgent)
     return &HttpRequestBuilder{url, &req, nil, map[string]string{}}
 }
 
@@ -106,7 +120,7 @@
     var req http.Request
     req.Method = "PUT"
     req.Header = http.Header{}
-    req.UserAgent = defaultUserAgent
+    req.Header.Set("User-Agent", defaultUserAgent)
     return &HttpRequestBuilder{url, &req, nil, map[string]string{}}
 }
 
@@ -114,7 +128,7 @@
     var req http.Request
     req.Method = "DELETE"
     req.Header = http.Header{}
-    req.UserAgent = defaultUserAgent
+    req.Header.Set("User-Agent", defaultUserAgent)
     return &HttpRequestBuilder{url, &req, nil, map[string]string{}}
 }
 
@@ -130,9 +144,9 @@
     if b.params != nil && len(b.params) > 0 {
         var buf bytes.Buffer
         for k, v := range b.params {
-            buf.WriteString(http.URLEscape(k))
+            buf.WriteString(url.QueryEscape(k))
             buf.WriteByte('=')
-            buf.WriteString(http.URLEscape(v))
+            buf.WriteString(url.QueryEscape(v))
             buf.WriteByte('&')
         }
         paramBody = buf.String()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/httplib.go/httplib_test.go 
new/httplib.go/httplib_test.go
--- old/httplib.go/httplib_test.go      2011-06-24 14:18:00.000000000 +0200
+++ new/httplib.go/httplib_test.go      2011-10-06 14:52:13.000000000 +0200
@@ -5,18 +5,19 @@
 )
 
 func TestFluidGet(t *testing.T) {
-        s,err := Get("http://google.com";).AsString()
-        if err != nil {
-                t.Fatalf(err.String())
-        }
-        if len(s) == 0 {
-                t.Fatalf("No data available\n")
-        }
+    query, err := Get("www.google.com/search").AsString()
+    if err != nil {
+            println(err.String())
+    }
+    println(query);
+    
 }
 
+/*
 func TestInvalid(t *testing.T) {
         _,err := Post("http://invalidurlsdfsdfasdfsdgf:9999/post";).AsString()
         if err == nil {
             t.Fatalf("Expected an error!")
         }
-}
\ No newline at end of file
+}
+*/
\ No newline at end of file

++++++ rpmlintrc ++++++
addFilter("binaryinfo-readelf-failed")  # go binaries are suposedly 
ELF-compliant
addFilter("statically-linked-binary")   # go doesn't yet support dynamic linking
continue with "q"...



Remember to have fun...

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to