HTTPS bug?

I use HTTPS via WiFi on a 8900, do a GET around 3000 bytes.  Sometimes when the data hits the last part so phone data are binary zeros rather than what it should be.

The HTTP response is divided on several IP packets.  The zeros start a package limit.  I have a trace of thread of the HTTP showing packages fine.   There is a proxy reversed providing SSL between the wire trace and phone, so its either that or the phone that is the source of the problem.  The proxy is Apache.

Someone saw something like that?

Phil.

Ah, I think it's just a bug in my code I do not call repeatedly read (buffer, offset, len) if I don't have all the data.  Funny how this kind if thing comes to me _immediately_ after I have a question and not within hours of anguish and thinking beforehand.

Phil

Tags: BlackBerry Developers

Similar Questions

  • DataOutputStream HTTP Post rinse and segment the encoding problems

    Hello

    I'm finally back to the question that I had a few months ago, but I can't always solve this

    I used this article to understand how to upload files into pieces of a server: http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800431/How_To _...

    Downloading is easy to implement, but I have problems with the download. I am trying to download a large file into smaller pieces. I tried different options. The one that works best is when I use DataOutputStream and write in there after each small party has been read from the file.

    But when I used the flush() function then he threw OutOfMemoryException()! But only if the file is quite large.

    An example of code:

    InputStream    is = (StreamConnection)Connector.open(url , Connector.READ_WRITE, true);
    HttpConnection c = (HttpsConnection)is;
    
    //set connection parameters
    c.setRequestMethod( HttpConnection.POST );
    c.setRequestProperty( "User-Agent", "MyUserAgent/0.2" );
    
    for( ;; )
    {   if( done ) break;
    
       //i have removed some reading code to simlify example
       out.write( bytedata  , 0 , bytesRead );
       Thread.yield();
    }
    
    out.flush();     //<-- OutOfMemory exception here!
    
    int result = c.getResponseCode();
    
    out.close();
    

    I found that I wasn't the only one to have this problem.

    1: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4212479

    2: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5026745

    I usually have the same code, but only use HTTPConnection for this.

    The solution was to use "Chunked" encoding of the header and appellant hunting every time data is written to the output stream.

    However, it has not worked for me. If I use a stored block coding, I 'ConnectionClosedException' when flush() is used for the first time.

    Here is a code example:

    InputStream    is = (StreamConnection)Connector.open(url , Connector.READ_WRITE, true);
    HttpConnection c = (HttpsConnection)is;
    
    //set connection parameters
    c.setRequestMethod( HttpConnection.POST );
    c.setRequestProperty( "User-Agent", "MyUserAgent/0.2" );
    c.setRequestProperty( HttpProtocolConstants.HEADER_TRANSFER_ENCODING, "chunked" );
    
    for( ;; )
    {
       if( done ) break;
    
       //i have removed some reading code to simlify example
       out.write( bytedata  , 0 , bytesRead );
       Thread.yield();
       out.flush();     //<-- ConnectionClosedException
    }
    
    int result = c.getResponseCode();
    
    out.close();
    

    Here is a screenshot of the at the time of the exception stack trace:

    And here are the details of the exception:

    Now, I honestly don't know what to do next. I tried all sorts of options and choices, but can not get this to work for some reason to download any.

    Tried on BlackBerry JDE and Simulator 4.2.1

    Help, please

    Thank you.

    Thank you, but I think that this was not related to this problem.

    The solution is to use SocketConnection would work on writing data OutputStream and flush(). But only if the Content-Length is calculated with precision and this server application is also properly formatted.

    If there are errors in the POST request, the server would send a message back and ConnectionClosedException appear.

    The best way to resolve these issues is to get a sniffer package good as "Wireshark" and study all the packages with a lot of attention even a small typo can break everything.

    I have another question, but the download itself works with the function flush() as expected on the device and emulator. So I think this can be considered fixed.

  • Problem with large XML files over HTTP segmented analysis

    I am trying to isolate a bug introduced when the JRE in Java 7u51 use 7u71 without changing the codes. The problem seems to be very similar to: Bug ID: JDK-8027359 XML parser returns incorrect results of analysis.

    Further investigation showed that it was also introduced in the same versions (7u71) where this patch has been applied. Unlike this bug, my XML is marked as version 1.0. He also seems to be with only large XML, the order of 10 MB files or more.

    Is the closest I've been able to reduce it down to the code uses JAXB to disrupt a flow which tells me that the debugger is an org.apache.http.com.EofSensorInputStream / org.apache.http.impl.io.ChunkedInputStream. The exception I get is not consistent, but usually appears from pieces are replaced or mixed, with result the letters appearing in the attributes that are actually numbers, or like the following, where an attribute "testAttribute" gets partially crushed by the end of a timestamp that was in another section of the XML file.

    javax.xml.bind.UnmarshalException
    - with linked exception:
    [javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,98748]
    Message: Attribute name "testAttribu00Z" associated with an element type "testElement" must be followed by the ' = ' character.]
      at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:421)
      at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:357)
      at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:334)
    Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,98748]
    Message: Attribute name "testAttribu00Z" associated with an element type "testElement" must be followed by the ' = ' character.
      at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:598)
      at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:181)
      at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:355)
      ... 6 more
    
    
    

    A code here which seems to reproduce if you can connect to an XML server that returns a large segmented XML file:

      SchemeRegistry registry = new SchemeRegistry();
      registry.register(
                    new Scheme("http", 80, PlainSocketFactory.getSocketFactory()));
      HttpClient client = new DefaultHttpClient(new BasicClientConnectionManager(registry));
      String url = "http://someUrlReturningAlargeChunkedXML";
      HttpGet method = new HttpGet(url);
      HttpResponse response = client.execute(method);
    
      InputStream inputStream = response.getEntity().getContent();
    
      XMLStreamReader responseReader = factory.createXMLStreamReader(inputStream);
      JAXBElement<JaxBObjectOfResponse> wot = unmarshaller.unmarshal(responseReader, JaxBObjectOfResponse.class);
    
    
    

    There is no error if you connect using URL.openStream () to the same service. If I read bytes directly and write to a file, there is no error. The error occurs only when I try to disrupt it is great and I use Java 7u71 (or later). It can be constantly repeated with the jsp webapp I use, but did not show the error when I used the same code with a Wikipedia dump XML file.

    How can I unmarshal differently to avoid this problem? Or, how can I best isolate the bug so it can be sent to the appropriate bugs system?

    Seems to be related to this bug, which will be fixed in 7u80 and others (in April?).

    http://bugs.Java.com/bugdatabase/view_bug.do?bug_id=8059327

    Tests with the final version in early 7u80 showed it fixed my related question.

  • BUG? Presentation of elements via Dynamic Action in Internet Explorer generates "null."

    I first noticed this using the newly improved apex.oracle.com. When I have dynamic action that must send the values of page element and the value is null / empty, the call to post/ajax result includes the literal 'null' as the value for this parameter.

    for example
    p_flow_id = 65928 & p_flow_step_id = 2110 p_instance = 574862348021401 & p_request = FLOW_PPR_OUTPUT_R1858426911545391_reset_R_1858426911545391 & p_arg_names = P2110_VENDOR1 & p_arg_names = P2110_VENDOR2 & p_arg_values = 3754 & p_arg_values = null

    This only happens in Internet Explorer. I use IE9, but it seems to work that way, if I put it in IE8 mode as well.

    I returned and tested in the Apex 4.1.1.00.23 and I got the same result.

    Greg

    Hi Greg,.

    Thanks again for the follow-up. You are right, it is the "Set Value" operation that causes the problem when it is called with a null value. In fact, it's a bug of IE underlaying.

    See http://stackoverflow.com/questions/5387038/null-values-shown-in-form-fields-in-ie and also http://bugs.jquery.com/ticket/5163 strengthening jQuery

    I will file a bug to use jQuery.val () workarounds to the problem.

    Thank you
    Patrick
    -----------
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • BUG status: File.deleteOnExit () does not work on open files (win32)?

    I'm a bit confused about the status of the below bug:

    http://bugs.Sun.com/bugdatabase/view_bug.do?bug_id=4171239
    http://bugs.Sun.com/bugdatabase/view_bug.do?bug_id=6357433

    Is fixed? I use jdk1.6.0_25 32-bit on a 64-bit windows computer 7 where I create a temporary folder:
     
    
    
        File tempDir = File.createTempFile(name, "");
        if (!(tempDir.delete())) {
          throw new IOException("Could not delete temp file" + tempDir.getAbsolutePath());
        }
        if (!(tempDir.mkdir())) {
          throw new IOException("Could not create temp file" + tempDir.getAbsolutePath());
        }
        tempDir.deleteOnExit();
    It works fine if the folder is empty. But if I put a test.txt file in the folder created its not deleted on exit. DeleteOnExit() works only on empty folders?

    Yes, what I said above.

  • How to get around the java runtime bug - the indentation is overridden

    Hi all

    I generate xml data from a servlet and the flow of data to the client as the following code. It works fine on my local machine (the XML is well indented), but when the war file deployed to a geronimo Server 2.0.2. (It uses java 1.5.0_16). The xml streamed on without indentation

                   response.setContentType("application/xml");
                   response.setHeader("Content-disposition","attachment; filename="+fileName); 
    
                   // set up a transformer
                   TransformerFactory transfac = TransformerFactory.newInstance();
                   Transformer trans = transfac.newTransformer();
    
                   trans.setOutputProperty(OutputKeys.METHOD, "xml");                 
                   
                   trans.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); 
                   trans.setOutputProperty(OutputKeys.STANDALONE, "yes"); 
                   trans.setOutputProperty(OutputKeys.VERSION, "1.0"); 
    
                   trans.setOutputProperty(OutputKeys.INDENT, "yes");
                   trans.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
    
    
    
                   // create string from xml tree
                   DOMSource source = new DOMSource(doc);
    
                   ServletOutputStream os = response.getOutputStream();
                   OutputStreamWriter w = new OutputStreamWriter(os, "UTF-8");
                   StreamResult result = new StreamResult();          
                   result.setWriter(w);
                   
                   trans.transform(source, result);
    It's bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6337981 (the indentation is overridden)
    I've tried work around suggested it using OutputStreamWriter, it does not help.

    (I can not change anything on the server. I have to accept everything in the server)

    Help, please

    Thank you

    Published by: mycoffee on June 10, 2011 08:16

    You must set the Indent on the factory level, see bug #6296446. This only affects 1.5; 1.6 allows you to establish the level of withdrawal on the transformer, as you did (and for the compatibility of the versions, he put on both does not hurt).

    transfac.setAttribute("indent-number", Integer.valueOf(4)); 
    
  • What is the problem with the bugs to Adobe management system?

    I want to report a bug in the Flex SDK kit, but something wrong with Adobe JIRAs.

    I can not connect with my existing ID

    not getting emails trying to reset the password when I type this fake,

    can not activate a new account as with confirmation emails never arrive.

    I tried after the URL:

    https://bugs.Adobe.com/Flex/

    https://bugs.Adobe.com/JIRA/secure/dashboard.jspa

    Am I missing something?

    Thank you!

    He started working as it should last night to 9 hours EST.

  • or should the bug of the Flash IDE?

    I noticed that there is a system of flash player, Flexbugs, etc.: https://bugs.adobe.com/

    But I do not see an entry 'IDE Flash' or ' Flash CS3/4/5 "in this system... ' It's a "shame", because it would be

    • do not lose time to report a bug already reported,
    • help find workaround solutions,
    • contribute to improve the next version...

    So, where if the bug be mailed?

    https://www.Adobe.com/cfusion/mmForm/index.cfm?name=wishform

  • Is it a &lt; s:List bug?

    Flash Builder 4

    If you have a

    < s:List

    layout as TileLayout, with an itemRenderer.

    Click on a button, it filters the AC.

    Add the scroll bar because they are a more viewable objects.

    Click on the button it filters the AC.

    Removes the scroll bar because there are less than displayable objects.

    THIS IS WHERE IT GOES weird!

    Click on a button, it filters it.

    There are obviously more of viewable objects, but the scroll bars to add!

    I have a label linked to the length of the AC to tell me how much is supposed to be appear.

    He spent at least a day messing around with it.

    Looks like a bug to me.  Here's a slightly reduced test case:

    
    
        
            
        
    
        
            
                
                    
                        
                        
                        
                        
                        
                        
                        
                        
                        
                        
                        
                        
                    
                
                
                    
                        
                            
                        
                    
                
                
                    
                
            
    
            
                
                
                
            
        
    
    

    Could you please file a bug with this code to http://bugs.adobe.com and after the number of bug here?

  • Please explain the meaning of 'Deferred' in the JIRA bug database

    Dear Adobe team,

    I posted a few bugs recently and discovered this morning that they are now "closed" with a "Deferred" resolution

    Some of these bugs are

    https://bugs.Adobe.com/jira/browse/FB-26396

    https://bugs.Adobe.com/jira/browse/FB-26317

    https://bugs.Adobe.com/jira/browse/FB-26081

    Please explain how to understand this decision.

    My hypothesis is that the bugs remain open until they are solved in the next version.

    Why are these bugs closed or delayed?

    When the deferred bugs are reopened?

    Management will likely chime in here.

    Briefly, the bugs get carried over to the current version. They have reviewed again when planning continues for the next version.

    The only time wherever a bug/request is really dead is when it is marked as "retirement".

    Jason San Jose

    Software engineer, Flash Builder

  • possible bug? formatting number 0 is displayed as 4 294 967 295

    This is really two questions in one. First of all, I have a routine that sometimes gives a result of 0, which is * sometimes * displayed in an AdvancedDataGrid column in the form of 4 294 967 295, which I assume is somehow a significant number (more big int?). In any case, I have one ADG with a column defined as:

    < mx:AdvancedDataGridColumn headerText = "Remaining work" labelFunction = "rem_work_fmt" textAlign = "right" / >

    The called labelFunction is illustrated below:

    private void rem_work_fmt(item:Object,_column:AdvancedDataGridColumn):String
    {
    var num:String = numberFormatter.format (item.get_remaining_work ());
    trace ("result:" + num);
    return num;
    }
    Track of exit impressions: "result: 0" as expected, but the number displayed in the grid is sometimes 0 and 4294967295 sometimes.

    More strangeness, this only happens to the last column in the ADG. I call the same logic of format on another column and have never seen a wrong result. In addition, the same 'get_remaining_work()' function is called on the same data and the result is properly displayed in a field of text as 0.

    Second question, I met a few other possible bugs, I didn't report because I found a work around. How to do that in the beta program?

    LW1001,

    Bugs can be filed in the public bug at http://bugs.adobe.com/flex/
    You will need to register before you can submit bugs.
    Also, if you can attach files to bug to the bug report, it makes it much easier for Adobe to investigate.

    Let me know if you have any other questions/problems.

    Peter

  • HScrollBar maxScrollPosition bug?

    I have a HScrollBar that sets the position of a cover-flow component.

    Everything works fine (the coverflow to scroll bar position adjustment and vice versa).

    Scroll bar sets the fine position when you click a position on the scroll bar, use the arrows, but NOT when you drag.

    It seems that I can't set the maxScrollPosition dynamically. If I leave it empty the scroll bar is disabled. If I give a default, I can only drag the thumb to this value.

    I tested I'll put everything ok as follows:

    SpreadScrollbar.maxScrollPosition = issuesSpreads.length;
    trace ("work" + SpreadScrollbar.maxScrollPosition.toString ());

    Track prints a correct value (say; 19)

    If I set the max position value in the MXML to {issuesSpreads.length} the scroll bar is grayed out new :(

    Help, please

    Thank you

    Rob

    I found this bug from the Flex SDK bug tracking system:
    https://bugs.Adobe.com/jira/browse/SDK-11994?page=com.atlassian.JIRA.plugin.System.issueta bpanels:all - tabpanel

    She says that to fix the bug, you can call this function in your scroll bar:
    invalidateDisplayList();

    So it would look like this:
    yourScrollBarId.invalidateDisplayList ();

  • HTTP Timeout - Explorer vs Firefox

    I discovered that if you make a request, using URLLoader or other type of request objects, if the connection fails to connect browsers react differently. The issue I encountered is with Firefox, it does not appear any time. If she fails to connect you will never get an onFault, or response onComplete.

    Has anyone else seen elsewhere? Is my best option to create my own Timer with a time-out?

    To reproduce: you can use the code example provided on:
    http://livedocs.Adobe.com/Flex/2/langref/Flash/NET/URLRequest.html#includeExamplesSummary

    Change URLRequest ("XMLFile.xml") to URLRequest ("' http://www.google.com" "), disable your network connection, run your Flex application with Firefox and explore and see the difference.

    Thank you

    In my view, using a timer is the best solution. Please this file as a bug in our new public bugbase for Flex at http://bugs.adobe.com/flex and mention that it's really a problem of browser/player. The team of the player is not currently a public bugbase.

  • Bug Builder - .svn folders are copied to the Flex output folder

    Hello

    I use the control system version of Subersion (using Tortoise SVN client) to control my Flex project code.

    I added to the subversion repository my Flex (all files except the bin folder) project. When the Flex compiler generates the project, it copies the "html-template" file in the bin directory, it also copies the '.svn' folders that subversion system puts in the folder "html-template". This also happens if I choose to "copy the files not included in the output directory" option in the properties of the project Flex compiler. The compiler copies all ".svn" folders found in the source folder (recursively).

    As I see it, it's a bug because the '.svn' folders are hidden, for this purpose they may not be copied.
    Maybe it's a missing feature in the properties of the flex compiler, which tells the compiler Flex does not copy hidden files in the output directory.

    Note, that I recently logged in as https://bugs.adobe.com/jira/browse/FB-10813

    It has been marked fixed for Flex Builder 3 Beta 3 - so stay tuned and try
    It is when a new draft is available.

  • BlendMode.LAYER &amp; amp; wmode = transparent &amp; amp; FF bug

    Hello, I have problems with the latest version of flash player 10. Everything worked before the upgrade, but since I'm not able to get BlendMode.LAYER and wmode = transparent works in firefox (2 or 3).

    I described my problem and I have files of examples here:
    http://arkkimaagi.googlepages.com/home

    Basically, if I'm using blendMode = BlendMode.LAYER; in a flash that has transparent background in firefox, I get these ugly borders around all the objects that have the blendMode set to layer.

    Any suggestions I could do to work around this problem?

    Edit:
    I also added this bug to adobe. Please vote for her to draw attention to this issue.
    https://bugs.Adobe.com/jira/browse/FP-970

    I'll see if I can get one of the team to check it out. If we can't repro, we can change your jira bug internal...

Maybe you are looking for

  • Export EPUB 3 pages?

    It's great that Pages offers the possibility to export to EPUB.  But what version of the EPUB standard? EPUB 3 differs significantly from 2 EPUB in its ' underlying structure and capacity. Also, anyone know if the iOS version of Pages exports to the

  • I see unwanted spikes or noise in the input

    I'm running a signal chirp, with beginning of frequency 1 kHz to 42KHz, with a frequency of sampling of 500 k and 35000 samples. The DAQ card is the 6070E. IM display the signal through the transducer and reading in the signal received with another s

  • Lenovo C200 all in one recovery DVDs

    Hello Anyone know where I can get the Lenovo C200 all in one Recovery DVD for? Is there a place to download them, or what I have to cross and ring support for Lenovo?

  • System to disable the password help!

    HP Pavilion dv6-6c10us is the model and I need assistance trying to pass this screen please... I don't want to lose my important information. disabled system codes rises 51940321. I've been trying to google image search, but no luck...

  • Bad port 5 swich?

    Hosts: I used this same switch 5 ports for awhile but removed that I is no longer necessary to share the connection. Now, I needed to reuse the switch. I connected the cable between the router and the swih e-NET and the port fire lighted up as expect