Content-Length Header being stripped out of Gatewayed pages

I am working to integrate the GPL'ed Moodle e-learning web application with Plumtree.  However, I'm hitting a snag.  For certain POST events, Moodle expects to receive a content-length header.
When I use the application outside the portal, it works fine, and the Content-Length header is sent.  However, when I have the application gatewayed through the portal, the Content-Length header seems to get stripped out of the HTTP request and I get HTTP error 411 (Content Length Required).
Is there a way I can convince the portal to not strip out the Content Length HTTP header?

I'm working with .NET portal.
For the particular file that caused the error as reported in the tcptrace log, I opened IIS manager, found the virtual directory, right clicked to open the properties dialog and checked directory security.
Select edit anonymous access to check the account used for anonymous access, supply the user account needed and allow IIS to manage password. If in doubt check the settings on pages containing http post that are functioning properly.
Check Integrated Widows Authentication
I found this virutal directory had no user in the anonymous account, not sure how this happened. This resulted in pages that contained post/postbacks giving the "length required" error when I hit a button to perform the post/postback. Pages that did not contain Posts/Postback work correctly.

Similar Messages

  • SPA303 - Reordering the position of Content-Length header in SIP INVITE

    Hi,
    I have SPA303 IP Phone connected behind a SIP ALG router but have been facing issues with media setup for incoming and outgoing calls.
    Further investigation using SIPp script helped me out to understand the root cause of the issue which is as follows:
    If the SIP INVITE or 200 OK for SIP INVITE has Content-Length header ahead of the Content-Type header, the SIP ALG router is not able to handle the RTP traffic for the calls.  Cisco SPA303 IP phone exhibits this behaviour and hence couldn't successfully establish call with the SIP ALG that I use.
    Can you please confirm if it is configurable to reposition or re-order the Content-Length header to resolve this issue?
    Thanks in advance.
    Regards,
    Anand Krishnan

    As far as I know it's not configurable. According SIP protocol, the order of SIP headers is not meaningfull.
    Your router need to accept both orders as both are corrrect and have same meaning. Ask the vendor of router for updated firmware ...

  • Content-Length header not changed after url-rewrite... yields cut page.

    We use iPlanet6 ,service pack 4. The pages that return from the servlets are
    changed by the Application Server. The Application Server adds
    GXHC_GX_jst=901a10a6662d6164& to the all the URLs (which increase the
    page's size). The problem is that Application Server does not change the
    Content-Length header in the servlet response. This yields cut pages in the
    browser (IExplorer5).
    If we don't add the Content-Length header it works fine. (I.e., The pages
    are not cut.) Our problem is that we work with mobile devices that must have
    the Content-Length header to work properly.
    Q: Do you know if there is a patch that fix the problem?
    Q: Is it possible to configure the Application Server to prevent this
    url-rewrite?
    Regards,
              Aviram

    Hi guys,
    I would like to do url rewriting on our CF app but am worried I'll break something if I try and do it myself - is there anyone who would be interested in a bit of consultancy to help us achieve this?
    I want to turn http://www.allchichesterjobs.com/search-results.cfm?sector=21&q=part-time-jobs
    into http://www.allchichesterjobs.com/part-time-jobs
    I've tried this using IIS and URL Rewrite, when I browsed to http://www.allchichesterjobs.com/search-results.cfm?sector=21&q=part-time-jobs
    my browser was redirected to http://www.allchichesterjobs.com/part-time-jobs ok - but then I got a 404 error
    I'm wondering if I can pay someone to remote view my screen while we talk on skype and tell me what to do?
    Hope it's ok to post this sort of request on here
    Thanks very much indeed.
    Nick

  • Content-Length Header Missing in Http Response

    Hi folks,
    Our application uses JSPs and Servlets. To solve a TCP level probelm, we would like to ensure that each response sent from the WebLogic Server includes a content-length header. All the pages are dynamic and therefore we cannot explicitly set the content-length.
    To ensure that WebLogic has the opportunity to set this header, we have increased the response buffer size by adding a <%@ page buffer="nK" %> header to our JSPs and a response.setBufferSize call to our Servlets. The responses still do not contain a content-length header.
    Is there anything else we can do to get WebLogic to set this header?
    Thanks in advance,
    Santosh

    Anybody?

  • Gzip / Content-Length HTTP-Header

    Hello,
    I'm writing an HTTP-Proxyserver, but I don't know how to get the length of a GZIPOutputStream ... I'm compressing the data, if the server does not send gzipped data:
    logger.debug("Encode as GZip data!");
    byte[] BinaryBody = new byte[8192];
    GZIPOutputStream gzipOut = new GZIPOutputStream(client.getOutputStream());
    int length;
    while ((length = in.read(BinaryBody)) != -1)
         gzipOut.write(BinaryBody, 0, length);
         gzipOut.flush();
    gzipOut.close();I often get a Nullpointer exception in the line (while ((length = in.read(BinaryBody)) != -1)
    I think it's because I don't set the Content-Length Header, but I'm not sure.
    greetings,
    Johannes

    Disable the "Use Chunked Streaming Mode" property in HTTP Transport Configuration of your business service. By default it remains enabled.
    Regards,
    Anuj

  • Content-Lengh Header Missing in Http Response

    Hi folks,
              Our application uses JSPs and Servlets. To solve a TCP level problem, we would like to ensure that each response sent from the WebLogic Server includes a content-length header. All the pages are dynamic and therefore we cannot explicitly set the content-length.
              To ensure that WebLogic has the opportunity to set this header, we have increased the response buffer size by adding a <%@ page buffer="nK" %> header to our JSPs and a response.setBufferSize call to our Servlets. The responses still do not contain a content-length header.
              Is there anything else we can do to get WebLogic to set this header?
              Thanks in advance,
              Santosh

    Anyway, this works for me:
    try {
      URL u = new URL("http://localhost:9090/");
      HttpURLConnection c = (HttpURLConnection) u.openConnection();
      c.setInstanceFollowRedirects(false);
      c.connect();
      Map<String,List<String>> hs = c.getHeaderFields();
      for(Map.Entry e : hs.entrySet()) {
        System.out.println(e.getKey() + ": " + e.getValue());
    } catch (Exception ex) {
      ex.printStackTrace();
    }Where on localhost:9090 I have a server that will issue a redirect on / and content on anything else.
    This code will issue the request, then read the response headers, including the Location: header.

  • Content length tool in Inspector and disappearing links

    I've encountered a couple of problems, one that I've solved in a haphazard way that may be of some help to some people, and one I'm still scratching my head over.
    First, often my content length in the inspector for the site page simply doesn't work. This usually happens after I've finished most of what I planned to do and have adjusted the length once or twice already. I've tried shutting down the program and/or rebooting the computer, and while that solved the problem once it usually doesn't. I also make sure for example that if I have a box, the content length is longer than the shape. Any thoughts on how this might be remedied?
    Also I noticed that if you inadvertantly move a text box or shape to the back of another element, when the links reappear they no longer work. They may work on iWeb but not on the Web site once it is published. I figured out if I make a separate text box, small just for the link, and hyperlink it there after the problem, that works just fine.
    Thx ahead of time.
    macbook    

    First, often my content length in the inspector for
    the site page simply doesn't work.
    As far as the settings for Content Height in the Inspector Page tab... it's not that they don't work...it's just that they are set incorrectly by default and the dynamically expanding page in iWeb is not reflected at all in the Content Height value (or any other value in that tab).
    To properly adjust the Content Height, it's best to wait until you have finished designing your page, but it's perfectly fine to make adjustments along the way, too. You need to go under the "View" menu and turn on the "Show Layout" feature. That way you can see the border between where the page stops and where the footer begins.
    Focus on this border for your Content Height adjustments. I usually recommend that you simply start increasing the Content Height until you start to see the footer border start moving DOWN the page. Depending on your page, you may reach values of 1000 or 2000 or even more. But once you see the footer border move down, then you know you have reached the correct value for Content Height.

  • JavaMail doesn't send Bcc + Content-Length

    Hello Folks,
    I recently found a String ignoreList in the class SMTPTransport which contains already "Bcc" and "contentLength":
    /*  141 */   private static final String[] ignoreList = { "Bcc", "Content-Length" };
    Thus I wanted to know whether sending Emails without the Bcc and Content-Length Header is on purpose or meant to be fixed in the following version.
    Thanks in advance!
    Greetings,
    Daniel

    It's on purpose.
    The whole point of Bcc is that it's not included in the headers of the sent message, despite the message being sent to the Bcc'ed recipients.
    Content-Length is not relevant for a message in transit, it's only used in some Unix mailbox formats.

  • Incorrect Content-Length

    Dear Java Experts,
    I am writing a program which communicates with a servlet. The OutputStream of the URLConnection is get and I write a String to it. However, when I use the getContentLength Method to check, the length is always 4. In turn, the server-side always gets an EOFException.
    The display output of my program is:
    Invoker: DATA LENGTH = 357
    Invoker: CONTENT_LENGTH = 4
    The code statement is:
    URL servletUrl = null;
    URLConnection conn = null;
    ObjectInputStream ois = null;
    ObjectOutputStream oos = null;
    int backcmd = -1;
    Object ret = null;
    URL servletUrl = new URL(location);
    conn = servletUrl.openConnection();
    conn.setDoInput(true);
    conn.setDoOutput(true);
    conn.setUseCaches(false);
    conn.setRequestProperty("Content-Type", "application/octet-stream");
    BufferedOutputStream connos = new BufferedOutputStream(conn.getOutputStream());
    System.out.println("Invoker: DATA LENGTH = "+myString.length());
    connos.write(myString.getBytes());
    connos.flush();
    connos.close();
    int length = conn.getContentLength();
    System.out.println("Invoker: CONTENT_LENGTH = "+length);
    Please help.
    Ray

    According to the JDK Help - URLConnection.getContentLenght() returns the length of the content-length header field
    This does NOT sound like what you are trying to get
    perhaps you should try something like
    int length = ((String)conn.getContent()).length();

  • SunOne Web Server 6.1 and JSP response content-length

    Hi,
    I am looking for help for a problem in my previous post
    http://swforum.sun.com/jive/thread.jspa?threadID=58612.
    It seems to me the only significant difference of the response to the same jsp file from 6.0 and 6.1 server is the content-length header.
    6.0 response has the content-length header;
    6.1 response does not have the content-length header.
    HttpUrlConnection::getContentLength() returns the actual content length of the 6.0 response;
    HttpUrlConnection::getContentLength() returns -1 for the 6.1 response.
    Here is the dump,
    SunOne WebServer 6.0
    allowUserInteraction? false
    content? sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@1eed786
    contentEncoding? null
    contentLength? 999
    contentType? application/x-java-jnlp-file
    Date? 1131378080000
    DefaultAllowUserInteraction? false
    DefaultUseCaches? true
    DoInput? true
    DoOutput? false
    Expiration? Wed Dec 31 19:00:00 EST 1969
    FileNameMap? java.net.URLConnection$1@1a1c887
    lastModified? Wed Dec 31 19:00:00 EST 1969
    requestMethod? GET
    responseCode? 200
    responseMessage? OK
    HEADER::Set-cookie=[JSESSIONID=pkand013-1%253A436f75a0%253A5b909ee2e5bbe3bc;path=/]
    HEADER::Date=[Mon, 07 Nov 2005 15:41:20 GMT]
    HEADER::Server=[Netscape-Enterprise/6.0]
    HEADER::null=[HTTP/1.1 200 OK]
    HEADER::Content-length=[999]
    HEADER::Content-type=[application/x-java-jnlp-file]
    SunOne WebServer 6.1
    allowUserInteraction? false
    content? sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@1fee6fc
    contentEncoding? null
    contentLength? -1
    contentType? application/x-java-jnlp-file
    Date? Mon Nov 07 10:49:07 EST 2005
    DefaultAllowUserInteraction? false
    DefaultUseCaches? true
    DoInput? true
    DoOutput? false
    Expiration? Wed Dec 31 14:00:00 EST 1969
    FileNameMap? java.net.URLConnection$1@1503a3
    lastModified? Wed Dec 31 19:00:00 EST 1969
    requestMethod? GET
    responseCode? 200
    responseMessage? OK
    HEADER::null=[HTTP/1.1 200 OK]
    HEADER::Expires=[Wed, 31 Dec 1969 19:00:00 EST]
    HEADER::Set-cookie=[JSESSIONID=44A318F4BC0802A4C70C27FD4AB1C115;Path=/]
    HEADER::Transfer-encoding=[chunked]
    HEADER::Date=[Mon, 07 Nov 2005 15:49:07 GMT]
    HEADER::Pragma=[No-cache]
    HEADER::Server=[Sun-ONE-Web-Server/6.1]
    HEADER::Content-type=[application/x-java-jnlp-file]
    HEADER::Cache-control=[no-cache]
    In my test env, 6.0 and 6.1 are installed on the same machine (Win2K), using the same directory as web root, same http port. Browser runs on a different machine.
    Thanks
    Harry

    Hi, elving
    This is good information. Thanks very much.
    Actually, I am not using SSL, just plain http connection with basic auth. It might be the cache-control header that causes the head ache. 6.0 response does not have the cache-control header, but 6.1 has.
    The interesting thing is that adding a servlet mapping on 6.1 solves the problem.
    I will take a further look tomorrow.
    Cheers,
    Harry
    I doubt the problem has to do with the Content-Length
    header.
    I'd guess that you're using SSL. Are you? If so,
    you're almost certainly bumping into a known bug (or,
    as Microsoft describes it, a "feature") in Internet
    Explorer. Microsoft article KB316431 at
    http://support.microsoft.com/default.aspx?scid=316431h
    as some information on the problem. As the article
    points out, the problem occurs when Internet Explorer
    needs to invoke an external application to handle a
    file that was served over SSL with Cache-Control:
    no-cache and/or Pragma: no-cache headers.
    A work around would be force Web Server to send
    Cache-Control and Pragma headers that don't include
    the no-cache directive. For example, the following
    lines could be added to the obj.conf configuration
    file:<Object ppath="*.jnlp">
    Output fn="set-variable" set-srvhdrs="Cache-Control:
    private"
    Output fn="set-variable" set-srvhdrs="Pragma:
    private"
    </Object>Fortunately, it sounds like you've already
    found another viable work around.

  • Bug: XMLHttpRequest mishandles content-length

    In the Palm Pre browser, if you are running JavaScript code that Posts an XMLHttpRequest query that returns an XML document *and* that document doesn't have an explicit content-length header, the browser assumes a content-length of zero and presents an empty document. (If there is an explicit content-length header, then the browser uses it as the length of the returned XML document and all is well.)
    FWIW: In the JavaScript code that I've been using to dig into this issue, I have:
    xmlDoc=xhttp.responseXML;
    alert(xhttp.getAllResponseHeaders());
    alert(xhttp.responseText.length);
    The getAllResponseHeaders() call returns all the headers that I see going across the wire (using WireShark) *PLUS* a "content-length=0" header that isn't coming from the server (the server is not sending any content-length header). The responseText.length then, of course, reports a length of zero, regardless of the true length of the XML document being transmitted.

    I actually looked at the developer forum first as a place to post this, but that forum seemed to be 100% aimed toward native WebOS app development. I really didn't see an appropriate spot to report a bug that seems to reside within the browser. (I know far too little of WebOS app development to claim any knowledge of whether the WebOS app JavaScript interpreter has the same bug as the browser JavaScript interpreter.)
    So, that being said, which section of the developer forum would you suggest that I post in?
    Thanks!

  • Content-Lenght header on html pages

    I hope this is a simple one, and I am just lame in my web searching skills, but how would one get the Sun One Web Server 6.1 to include the Content-Length response header on requests for html pages?
    If I curl the web server for say an exe file (application\octet-stream mime type) the server sends me a Contetn-Length header in the response. When I curl a html page from the same server there is no Content-Length header in the response.
    I have a developer that wants to use this header to determine if we need to delete the object from our CDN network, which by the way does provide the Content-Length response header on html pages.
    Thanks in advance for any help on this.

    If there's no Content-Length header in the response when you request a .html file, server-parsed HTML has likely been enabled. When server-parsed HTML (aka SHTML or SSI) is enabled, the server parses the .html file and dynamically generates a response. When the response is dynamically generated, the server doesn't know how long the response will be until it has been completely generated. As a result, the server may omit the the Content-Length header.
    You can disable server-parsed HTML in the administration server GUI.

  • Hyperlinks being stripped

    So I upgraded to Excel 2008 only to discover that it is stripping all the hyperlinks out of any of my work spreadsheets that I open.
    So, I went over to Numbers and opened the same spreadsheet. The first two columns of this spreadsheet are lists of numbers, all hyperlinked to a web page. Well, in Numbers the first cell's hyperlink is still there, but all the rest have been stripped!
    There's nothing complicated about this spreadsheet, its simply 7 columns of info, the first two columns being numbers that have hyperlinks to web pages. Thats it, wasn't created with any macro's or anything. My IS guy created them in perl using Spreadsheet::WriteExcel, using the write_url() function, and everything looks fine in his copy of excel 2k8 or my copy of Excel 2004.
    I really don't want to have to keep using Excel 2004 if I don't have to. Since MS was stupid enough to break their own software and these spreadsheets seem to TRY to open correctly in Numbers, does anyone have any idea why the hyperlinks are being stripped out so I can at least use this?

    Hello
    In a not so old thread (02/13) I passed a list of Numbers error messages related to exchanges with XL.
    http://discussions.apple.com/thread.jspa?messageID=6587857
    You may copy them in a doc for future ref
    Some of these messages are related to hyperlinks.
    Here they are.
    +Couldn’t export hyperlinks outside table cells+
    +Hyperlinks in cells that don’t contain text weren’t imported.+
    +Hyperlinks on shapes aren’t supported and were removed.+
    +Hyperlinks within workbooks and hyperlinks to other files aren’t supported and were removed.+
    Maybe they explain what you get.
    Yvan KOENIG (from FRANCE mercredi 19 mars 2008 18:14:31)

  • HELP content  length always -1!!!!!

    Im developing a MIDlet to upload data to a servlet but my content length is always -1
    here is my code
    HttpConnection c = null;
        InputStream is = null;
        DataOutputStream dos = null;
        OutputStream os = null;
    try
           c = (HttpConnection)Connector.open(url2, Connector.READ_WRITE, true);
        c.setRequestMethod(HttpConnection.POST);
       c.setRequestProperty("IF-Modified-Since", "20 Jan 2001 16:19:14 GMT");
       c.setRequestProperty("User-Agent", "Profile/MIDP-2.0 Configuration/CLDC-1.0");
       c.setRequestProperty("Content-type", "multipart/form-data; " );
        c.setRequestProperty("Connection", "close" );
        c.setRequestProperty("Content-Length",Long.toString( size ) );
               dos = new DataOutputStream(c.openDataOutputStream());
        dos.writeLong(size);  
        dos.write(photo);  
        dos.flush();  
        dos.close();
        finally
          if(is!= null) {
            is.close();
          if(os != null) {
            dos.close();
          if(c != null) {
            c.close();
          }what am I doing wrong
    Thanks in advance!!

    It depends on what implementation you are running on, but WTK 2.2, for example, always seem to use the chunked transfer encoding when doing a POST and there is no Content-Length header in the request headers, and if the server reply is also sent using the chunked transfer encoding there will be no Content-Length header in the reply headers either
    regards
    simon

  • CFC stripping out quotes in JSON

    Any anyone tell me why the quotes in a JSON string are being stripped out when it's passed to a CFC?
    The post from a jqGrid is being sent to my CFC as:
    filters{"groupOp":"AND","rules":[{"field":"state","op":"eq","data":"CT"}]}
    When I dump out arguments.filters it shows:
    {groupOp:AND,rules:[{field:state,op:eq,data:CT}]}
    Why is my CFC doing that?

    Never mind.  I had some SQL Injection code that were stripping out the charcters.  I thought about that after I took a break.

Maybe you are looking for

  • Macbook will not boot in safe mode

    I tried to install the new Maverick OS X software but it is telling me that the install failed because the disk Macintosh HD is damaged and can't be repaired. I tried to restart my mac in safe mood so I can back up my important documents but the gear

  • ODC and UCM integration

    Hi All, I am facing one problem while using ODC and UCM. Thing we are able to do: 1. We are able to login in ODC through Windows Active User Credentials. 2. We can add users in Capture and that users are able to login into capture. We manage users in

  • 10g AS on AIX 5L

    Does anyone know when 10g AS will be available on AIX 5L? Oracle have said to me that it would be released on the 19th March, which is now 11 days ago and still no download! Come on Oracle, you have been promising this download for months (if not yea

  • Problem using 'Picture to Pixmap.vi' on RT target

    I have an application that runs fine from 'My Computer', but not when run on a RT target (PXI-8145 RT).  I narrowed down the difference in performance to Picture to Pixmap.vi (supplied by NI).  When run on the RT target, the 'image data' cluster outp

  • Mpavcontroller error domain error 3  when trying to download a movie

    I am trying to get on to Apple support as when I try and download a movie it saysmpavcontroller error domain error 3 . But I cant get on to Apple support as it says unsupported browser but my iPad software is up to date. Any solutions for both? My so