×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    4

    Problem http connection depends on carrier

    We are developping an application for a Series 60 v 1.0 Mobile. Our problem is we want to establish an Http connection for a filedownload. We have written a class that is doing the job for us, but we have troubles with that class depending on the the carrier we are using.

    We are developing in Austria. If we use the A1 network all is working as expected, but if we use ONE ore Telering we can’t establish a connection because the download always hangs during a read.



    This is our code:
    Code:
     
    
     
    
    The write method:
    
     
    
    iSocket.Write(*iRequest,iStatus);
    
                ChangeStatus(EWriting);
    
                SetActive();
    
     
    
    The corresponding RunL part:
    
     
    
                case EWriting:
    
                            {
    
                                       if(iStatus == KErrNone)
    
                                       {
    
                                                   ChangeStatus(EWrittenOut);
    
                                                   Read();
    
                                       }
    
                                       else
    
                                       {
    
                                      
    
                                                   Cancel();
    
                                                   ReportError(MHTTPStreamReader::EWriteFailed, iStatus.Int());
    
                                                   ChangeStatus(ENotConnected);
    
                                       }
    
                                       break;
    
                            }
    
     
    
    The read method:
    
     
    
                if(iEngineStatus == EWrittenOut || iEngineStatus == EReading)
    
                {          
    
                            __ASSERT_ALWAYS(!IsActive(),User::Panic(KPanicHTTPReader(),MHTTPStreamReader::EBadStatus));
    
                           
    
                            iSocket.RecvOneOrMore(iBuffer, 0 , iStatus, iLength);
    
                            ChangeStatus(EReading);
    
                            SetActive();
    
                }
    
     
    
    The corresponding RunL part is never reached:
    
     
    
                case EWrittenOut:
    
                            case EReading:
    
                            {
    
                                       switch(iStatus.Int())
    
                                       {
    
                                                   case KErrNone:
    
                                                   {
    
                                                               //do something with the read data
    
                                                               Read();
    
                                                               break;
    
                                                   }
    
                                                   case KErrEof:
    
                                                   {
    
                                                               //do something with the read data
    
                                                               Disconnect();
    
                                                               break;
    
                                                   }
    
                                                   case KErrDisconnected:
    
                                                   {
    
                                                               Cancel();
    
                                                               ReportError(MHTTPStreamReader::EDisconnected,iStatus.Int());
    
                                                               break;
    
                                                   }
    
                                                   default:
    
                                                   {
    
                                                               ReportError(MHTTPStreamReader::EBadStatus,iStatus.Int());
    
                                                   }
    
                                       }
    
                                       break;
    
                            }


    We don’t thinks that the network is the reason because we can download from the URL with Opera.



    Hope someone can give us a hint.



    Regards, Wolfgang

  2. #2
    Registered User
    Join Date
    Feb 2005
    Posts
    21
    I disagree. There are known-problems with A1. For A1, you have to carefully think about
    a) which HTTP version you are using (1.1 or 1.0)
    b) which port you are trying to connect to (e.g. 80)

    A1 has some bug in one of its proxy server which basically does not fully comply to the HTTP 1.1 specification.

    I don't know anything about ONE or Telering but I just wanted to say that it could well be a network problem.

  3. #3
    Registered User
    Join Date
    Jan 2005
    Posts
    4
    ok, we solved the problem after many tcp dumps. some http proxies don't understand \n newlines - they need \r\n newlines, otherwise the cancel the request.

  4. #4
    Registered User
    Join Date
    Feb 2005
    Posts
    21
    Proxies on the operator side ? Maybe you want to tell us more about (although there are probably not a lot Symbiand developers in Austria)

  5. #5
    Registered User
    Join Date
    Jan 2005
    Posts
    4
    after a few tcpdumps (on server side) we found out, that most operators in austria use proxies on port 80. I think this is very common.

    But most of them need \r\n new lines in the http header, otherwise they can't understand the request and cancel it. First we used only \n new lines in the header (see code above) and the requests worked on telekom/a1 only.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×