• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

HTTP request stream created by HttpURLConnection

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to POST a request using HttpURLConnection and am using a packet sniffer to look at the actual HTTP request being sent to the server.
Just where the content is supposed to begin (after content-length line), I see a 70-char 'junk'. Can someone please help me understand the 70-char 'junk' that apparently HttpURLConnection is writing into the HTTP request between the HTTP message header and the content.
POST http://java.sun.com/cgi-bin/backwards HTTP/1.1
User-Agent: Java/1.4.1_01
Host: java.sun.com
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Proxy-Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
Content-Length: 20
`W?� J J ^
G�m� E <M�@ ���
�)����h�p�P��x�P�q�� string=NikhilKumar
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can't think of anything; might help if we saw your code.
 
I am a man of mystery. Mostly because of this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic