Questions tagged [httpconnection]

The generic concept of a HTTP connection. May also refer to a concrete HTTPConnection in a specific library, especially the Android HttpConnection

The generic concept of a HTTP connection. May also refer to a concrete HTTPConnection in a specific library, especially the Android HttpConnection.

538 questions
4
votes
1 answer

Cannot connect using httpconnection in android

I am using android 2.3.3, i had made an rss reader which was working great, then i integrated the code of that simple rss reader into another activity, just copy pasted it carefully, no errors there. The problem is when i run the app on my emulator…
Salik
  • 508
  • 6
  • 17
  • 35
4
votes
2 answers

GZIPInputStream throws unknown format (magic number 213c)

While I used GZIPInputStream to compress bytes get from Internet, the program run error as follows: 05-08 17:37:02.465: W/System.err(744): java.io.IOException: unknown format (magic number 213c) 05-08 17:37:02.465: W/System.err(744): at…
Jake
  • 131
  • 2
  • 5
  • 13
3
votes
3 answers

java.io.IOException:Bogus chunk size

Can any one tell me why the Bogus chunk size error occurs. Exception at the swingToSvlt method:java.io.IOException:Bogus chunk size//->java.io.IOException: Bogus chunk size at sun.net.www.http.ChunkedInputStream.processRaw(Unknown Source)>>at…
vairam
  • 471
  • 1
  • 11
  • 26
3
votes
4 answers

Access to TCP-Connection via JavaScript

My goal is it to identify the TCP-Connections in a firefox-plugin. For that I need to set a unique ID to every connection. My question is, if its possible and someone knows how to get access to the Object of the TCP-Connection from a HTTP-Request?…
3
votes
1 answer

How does consuming till the end of stream using EntityUtils.consume(httpEntity) result in releasing the connection back to the connection pool?

I read here that EntityUtils.consume(httpEntity) will result in releasing the connection back to the connection pool, but when I looked at the source code, I couldn't understand how is that happening. Can someone please point me to the part of the…
3
votes
2 answers

Why I receive 503 status code when there is no network connection on android using retrofit?

Here is my request look like Single> fetchRawData() and the http cache is enabled. When internet connection is off and first time when I go to this fragment I receive UnknowHostException and when I check with flipper it…
Artur A
  • 257
  • 3
  • 20
3
votes
4 answers

Problems opening http connection from blackberry simulator

I'm having trouble when opening a simple HttpConnection from the simulator, I've have appended the deviceside=true suffix to my url, however it's still not working, I'm receiving an empty httpconnection with response code of 0. This is the code…
Pablo
  • 3,433
  • 7
  • 44
  • 62
3
votes
2 answers

how to use the HTTP range header in J2ME?

is it possible to use range header in HTTP with HTTP GET request? if yes than how? I just want to download bytes from server with specified bytes. i.e if I want to download bytes from 0 to 255.
Hitendra
  • 3,218
  • 7
  • 45
  • 74
3
votes
3 answers

How to force the HTTP connection over Wi-Fi instead of cellular in Android?

My application has to detect that the device connected to the Wi-Fi network is the required one and then fire a HTTP request over that Wi-Fi network programmatically. I have searched, but I didn't find any method or class which will help me to do…
amsiddh
  • 3,513
  • 2
  • 24
  • 27
3
votes
2 answers

Display static Google Map image in BlackBerry 5.0

I'm having a really interesting problem to solve: I'm getting a static google map image, with an URL like this. I've tried several methods to get this information: Fetching the "remote resource" as a ByteArrayOutputStream, storing the Image in the…
ramayac
  • 5,173
  • 10
  • 50
  • 58
3
votes
1 answer

Login to website using http.client

I am trying to login to a website using http.client in Python using the following code: import urllib.parse import http.client payload = urllib.parse.urlencode({"username": "USERNAME-HERE", "password":…
3
votes
1 answer

python httplib: getting the outgoing request headers

I do: con = HTTPConnection(SERVER_NAME) con.request('GET', PATH, HEADERS) resp = con.getresponse() For debugging reasons, I want to see the request I used (it's fields, path, method,..). I would expect there to be some sort of con.getRequest() or…
Guy
  • 14,178
  • 27
  • 67
  • 88
3
votes
1 answer

JSoup Connection.userAgent defeated by sun.net.www.protocol.http.HttpURLConnection

Apparently, sun.net.www.protocol.http.HttpURLConnection will always append "Java/version" to the UserAgent. Therefore, JSoup Connection.userAgent cannot set the useragent to what you want; the "Java/version" stuff gets appended anyway. See Set…
JWG
  • 151
  • 1
  • 6
3
votes
0 answers

Why http client responds to a [FIN, ACK] with a [ACK], (without responding a [FIN, ACK])?

Server sends a [FIN, ACK] after the connection timeout, sometimes client responds with a [FIN, ACK] and collection get closed properly. But sometimes client responds with a [ACK] and try to send data to the server. Can someone please explain why…
3
votes
1 answer

Downloading from dropbox url ignores range

If i want to download a file from a dropbox url my http header range is ignored: httpRequest = new HttpGet(url.toURI()); httpRequest.addHeader("Range", "bytes=" + startPos + "-" + dwnInfo.getStopRange()); httpRequest.addHeader("Accept-Encoding",…
Tazz
  • 781
  • 1
  • 8
  • 23