HTTP InputStream readLine() wont get past headers??

I can't seem seem to get past the headers in this code... Help is GREATLY appreciated!! I've been stuck on this for 2 weeks!!
my output is always:
Line = POST / HTTP/1.1
Line = Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/x-icq, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Line = Accept-Language: en-us
Line = Content-Type: application/x-www-form-urlencoded
Line = Accept-Encoding: gzip, deflate
Line = User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
Line = Host: localhost:8080
Line = Content-Length: 58
Line = Connection: Keep-Alive
Line = Cache-Control: no-cache
Line =
readLine() blocks no matter what, even tho there is POST data on the following line, the headers even say so. "58" characters.
This code is for my HTTP Server than accepts xml through post.
        // setup socket, input and output channel
        socket = serverSocket.accept();
        input = socket.getInputStream();
        output = new PrintStream(socket.getOutputStream());
        BufferedReader sr = new BufferedReader( new InputStreamReader(input) );
        // HEADER PARSING
        while ((inputLine = sr.readLine()) != null)
          System.out.println("Line = " + inputLine);
          if ( inputLine.equals("") )
            break;
          if ( !inputLine.startsWith("POST") )
            String[] header = inputLine.split(":");
            theHeaders.setProperty(header[0].trim(), header[1].trim());
        // CONTENT PARSING
        while ((inputLine = sr.readLine()) != null)
          inputTotal.append(inputLine);
          if (inputTotal.length() > Integer.parseInt(theHeaders.getProperty("Content-Length")) )
            break;
        }

I'm not entirely sure that is the problem, but I can check...
It looks like I can pull individual characters, why wouldn't I be able to pull this line???
        char[] buff = new char[1];
        while( true )
          sr.read(buff);
          inputTotal.append( buff[0] );
          System.out.println(inputTotal);
        }Line = POST / HTTP/1.1
Line = Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/x-icq, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Line = Accept-Language: en-us
Line = Content-Type: application/x-www-form-urlencoded
Line = Accept-Encoding: gzip, deflate
Line = User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
Line = Host: localhost:8080
Line = Content-Length: 58
Line = Connection: Keep-Alive
Line = Cache-Control: no-cache
Line =
v
va
var
vari
varia
variab
variabl
variable
variable=
variable=l
variable=lo
variable=lol
variable=lol+
variable=lol+t
variable=lol+th
variable=lol+thi
variable=lol+this
variable=lol+this+
variable=lol+this+i
variable=lol+this+is
variable=lol+this+is+
variable=lol+this+is+a
variable=lol+this+is+a+
variable=lol+this+is+a+v
variable=lol+this+is+a+va
variable=lol+this+is+a+val
variable=lol+this+is+a+valu
variable=lol+this+is+a+value
variable=lol+this+is+a+value+
variable=lol+this+is+a+value+f
variable=lol+this+is+a+value+fo
variable=lol+this+is+a+value+for
variable=lol+this+is+a+value+for+
variable=lol+this+is+a+value+for+m
variable=lol+this+is+a+value+for+my
variable=lol+this+is+a+value+for+my+
variable=lol+this+is+a+value+for+my+v
variable=lol+this+is+a+value+for+my+va
variable=lol+this+is+a+value+for+my+var
variable=lol+this+is+a+value+for+my+vari
variable=lol+this+is+a+value+for+my+varia
variable=lol+this+is+a+value+for+my+variab
variable=lol+this+is+a+value+for+my+variabl
variable=lol+this+is+a+value+for+my+variable
variable=lol+this+is+a+value+for+my+variable&
variable=lol+this+is+a+value+for+my+variable&s
variable=lol+this+is+a+value+for+my+variable&su
variable=lol+this+is+a+value+for+my+variable&sub
variable=lol+this+is+a+value+for+my+variable&subm
variable=lol+this+is+a+value+for+my+variable&submi
variable=lol+this+is+a+value+for+my+variable&submit
variable=lol+this+is+a+value+for+my+variable&submit=
variable=lol+this+is+a+value+for+my+variable&submit=s
variable=lol+this+is+a+value+for+my+variable&submit=su
variable=lol+this+is+a+value+for+my+variable&submit=sub
variable=lol+this+is+a+value+for+my+variable&submit=subm
variable=lol+this+is+a+value+for+my+variable&submit=submi
variable=lol+this+is+a+value+for+my+variable&submit=submit

Similar Messages

  • Old Ipod classic 160 gb wont get past battery charge screen has been sitting for months

    I have an old Ipod classic 160gb,that has been sitting for a long time so im sure the battery has no life in it at all,im charging it via usb cable and it wont get past the battery charge screen,how long would a completely dead battery take to move off the charge please wait screen untill you know its a deeper issue at hand if so how would you get it to start up pass the charging please wait screen?to see the true issue?
    Thanks for your help
    Ice

    Try to do a reset and see whether it can be solved
    http://support.apple.com/kb/HT1320?viewlocale=en_US&locale=en_US

  • My macbook pro wont get past the grey screen at startup. Help!!

    After doing a run of the mill software update on my macbook pro (running snow leopard) it froze during the "moving items into place" stage. I forced a shut down and now it wont get past the grey screen with apple logo and spinning wheel. I have tried booting from the original DVD but it still freezes. When I boot it in verbose mode it seems to stop at "jnl: unknown-dev: update_fs_block: error reading fs block # 3597880! (ret 5)", the Apple AHCD Disk Queue manager :: set power state is timing out and there is a disk I/O error. I have tried to reset the power manager (not sure if it worked or not) and I have also tried clearing the PRAM (again, not sure of that worked). When I try to look at the hard drive using target mode on my imac the hard drive doesn't come up but the DVD does. I'm concerned that my hard drive is fried. Any suggestions?

    It would help to state in your post which remedies you tried that didn't work.
    Start here >  OS X Lion: If you see a gray screen at startup
    If nothing there helped, try Starting up in Safe Mode
    Safe Mode deletes some system caches that may help.
    A Safe Mode boot takes longer than a normal boot so be patient. Once you are in Safe Mode, click Restart from the Apple menu.
    If a Safe Mode boot didn't work, since your Mac has OS X v10.7 installed, restart your Mac while holding down the Command + R keys so you can access OS X Recovery built in utilities. The startup disk may need repairing.
    Tip:  Hold down the Eject key while starting up your Mac to eject a disc.

  • I did a full system restore to my phone along with the new 7.0 update. Now I went to restore my phone setting back through Itunes and it goes through all the steps but when it is completed it wont get past the "Connect to Itunes" screen

    I did a full system restore to my phone along with the new 7.0 update. Now I went to restore my phone setting back through Itunes and it goes through all the steps but when it is completed it wont get past the "Connect to Itunes" screen

    So what happens when you connect to iTunes?

  • My ipod touch 4g 8 gigs is not turning on it wont get past the apple logo its not frozen because it turns the screen black and the apple logo please help me

    my ipod touch 4g 8 gigs is not turning on it wont get past the apple logo its not frozen because it turns the screen black and the apple logo please help me

    - Try a reset.
    Reset iPod touch:  Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Then connect to your computer and try to restore.
    - See if placing the iPod in recovery mode will allow a restore. For recovery mode see:
    iPhone and iPod touch: Unable to update or restore
    - If the logo still show all the time, let the battery fully drain. After charging for an hour try the above again.

  • Hey guys. my macbook air wont get past the screen with the apple on it during start up. how do i fix this? i have a paper saved on my laptop on need to get at it. thanks guy!

    hey guys. my macbook air wont get past the screen with the apple on it during start up. how do i fix this? i have a paper saved on my laptop on need to get at it. thanks guy!

    Your boot drive is damaged in some way. If you have an original installation disc, you can boot from that and run Disk Utility. From DU you can select your internal hard drive ("Macintosh HD" is the name Apple puts on it - you may have renamed yours) and select "Verify Disk". If errors come up, try "Repair Disk". If it repairs, then you should be able to restart and boot from it. If it doesn't show up or won't repair, your drive is probably hosed.
    Clinton

  • My macbook wont get past the gray startup page !!

    my macbook air wont get past the gray startup page!!
    i read about it and i think its because of the HD low space !
    so what should i do ?
    i tryed to repaire it and it didnt work !!

    With an external drive, after it has been setup, partitioned, etc., go to System Preferences and Time Machine, or if TM is showing on your dock, just click on it, and turn time machine on...you can then give it the name of the partition on the external drive where you want to backup.  TM will do that in the background and you don't have to think about it.
    I have the Mercury Elite Pro drive from OWC, 2 TB, that I partitioned into a backup partition and working partition...so TM backs up regularly and I can use the other partition for either another bootable Mac OS X space or just point applications to that space for file storage.
    You can clone the operating system using Carbon Copy Cloner or SuperDuper which are both free downloads.  They make a bootable copy of the operating system for you.

  • Macbook wont get past second screen (blue)when turned on

    just recently, my macbook (13 in 2008)started acting wrong for no apparent reason.when i turn it on it does the chime and the apple screen then goes to a blue screen and gets stuck there.if i start in safe mode, it doesn't even get past the apple screen. i've also tried to reset the pram, but no luck.

    did you try _*resetting the System Management Controller SMC*_ ?
    if still no joy, try booting from the install DVD, launch disk utility and run a +repair disk+ session. if DU reports problems, repeat until no more errors appear. if DU insists the disk can't be repaired, you may need to get DiskWarrior or [_*TechTool Pro*|http://www.micromat.com/index.php?option=comcontent&task=view&id=202&Itemid=107].
    JGG

  • Wont get past "Checking For Updates " for initial startup.

    Hey. So I just bought a Blackberry Playbook and I can not get past the "Checking For Updates" screen on the initial startup. It checks for updates and then says
    "Retry Activation
    Blackberry Tablet OS
    Version 1.0.2.2078
    Your tablet could not be activated because of error (1001)
    Tap Retry or Turn Off to try again later"
    I have dine both of those and neither work. I am really excited I bought this because I used to have a Blackberry Pearl. I want to use this tablet but the more I struggle the more I want to throw it out the window. Please help!! 

    Try starting in "Safe Mode" (hold shift at startup)
    http://docs.info.apple.com/article.html?artnum=107393
    If your computer starts up, repair permissions, verify disk (both in Applications/Utilities/Disk Utility)
    If you are able to get to apple.com, download the "Combo" update and avoid the "Software Update..." (use that to see what is needed and get them from the apple.com site) re-apply the update and restart.
    I'd start there. Post any results.
    Good Luck

  • Wont get past iturnes screen

    Hi!  When I turn on my ipod touch all I see is the connest to itunes screen...cannot get past it.  Please help

    You need to connect the iPod to a computer with iTunes and set up the iPod.  See:
    http://www.apple.com/support/ipodtouch/getstarted/

  • Mac mini wont get past the gray apple screen

    recently i bought a mac mini with intel i5 processor and os lion installed, it was perfectly running until today it wont start or rather get past the initial apple sreen with the spinning gear. yesterday i connected an external usb drive 1tb to use as backup disk and store my songs for itunes. today i cant use it , ihave tried safe mode booting , pressing command, option , p and r keys during startup, removing the power cord then reattaching it. anybody have a solution.

    i have tried removing the external drive but still problem persists

  • HPE-552SC and ASUS GTX750TI - wont get past BIOS

    Hi. My graphiccard delivered with the HPE-552SC has failed and I bought a new ASUS GForce GTX 750TI. After installing it the computer wont go past BIOS. Looking at some posts in support forums, some solutions could be to turn off UEFI - how ever when I press "ESC" on BIOS startup I cant run the application "Run UEFI Application" - see picture below.  BIOS is updated to 7.15. What to do? Best regards,Andree

    andrewmorgan98,The OP had a GTX460 160W  (that is what comes in that model unit). The GTX460 is superior to a GTX750ti card in all performance marks.  That is why the GTX660 140W  - 660Ti  150  was suggested. Those two cards have better performance marks that the OP's original GTX 460, and are within the wattage of the original PSU.  Why would the OP want to step down in performance?BTW, the GTX460 required two 6pin PCIE, so the OP has the required Watts and required PCIE plugs. The 660 needs 1, the 660Ti needs 2.

  • Photoshop Elements 10 Trial wont get past "accept license" screen.

    Hi
    On a Mac. OS: 10.6.8
    Have downloaded a trial version of Photoshop Elements 10.
    Tried launching it.
    Get a window asking me to accept the license for Elements Organizer.
    Click accept.
    Window disappears.
    Window reappears - again asking me to accept license for Elements Organizer.
    Click accept - window disappears when I click "Accept" - then just reappears, etc...
    Can't get past this window.
    Uninstalled the software.
    Re-downloaded it.
    Exactly the same thing.
    Tried the online chat-help thing.
    Waste of 15 minutes.
    Was sent here.
    (Just a thought, but I previously had a trial version of elements 9 - but uninstalled it - could that be messing something up?)
    Thanks

    This forum is for Adobe Digital Editions software, not Photoshop.....
    ===============

  • Ipod classic wont get past error screen

    Have tried resetting numerous times, have tried putting it in disk mode(doesnt allow me to, just shows error screen) Basically it will reach the apple logo then go a screen with a x and it says to go to apple.com for support.

    I have the same problem. I have not seen a posting for resolving, short of calling apple. Cannot get past "X" on the screen telling you to contact Apple.

  • POWERBOOK G4 14 1.33 WONT GET PAST THE APPLE SCREEN

    I have a powerbook G4 14 inch 1.33 mhz processor with 256 mb of ram. The screen will not get past the apple screen. I have tried 3 seperate hard drives none of them would boot past the apple screen. The disk drive is broken, I will be replacing it shortly to put a OS X CD or disk warrior cd in it. Does anybody know what would cause this? I reset PRAM, PMU and tried booting in safe mode. It gets to the apple and then the little circle spins and spins and it doesnt load..

    Heres some history of the computer. I orginally put a 12 gb hard drive cuz it came with no hard drive in it and it was working great, but then became slower and slower until it got stuck on the apple screen. i tried 2 other hard drives and they didnt work. i then replaced it with a brand new 60 gb hard drive. i also bought a new optical drive and put that in because the optical drive never worked. i have tried two different ram sticks. i have tried pressing shift,c,option none of that works. option makes it freeze on the boot screen. open firmware works...command S did work until recently...command v does not work...reset pram and nvram. reset PMU. I AM AT A LOSS. is there something i forgot to leave connected during the process that could be causing this? I get USB BOOT ERROR 0 1 1 in open firmware. I DOUBT its the logic board, because it makes the chime and I can get into open firmware and the start up screen.

Maybe you are looking for