2 reading HTTP headers

Hello

I intend to make a single sing - on in one of my applications. To access my application, the user needs to connect to a portal befor application. For this application, I get 2 headers, to verify that this person has authenticated successfully. But how can I read these 2 headers? It does work with the UTL_HTTP package, because I do not have an active request on a url. So I read something on the OWA_UTIL package, but I'm not completely sure of how it is possible with this package.

Greetings

Skirnir

It is Possible through the PlsqlCGIEnvironmentList in the dads.conf. You easily add the heade you want to read the dads.conf and call it from your application via

owa_util.get_cgi_env ('yourheader_name');

You can enter several headers to keep track.

Official reference Oracle:

7 oracle HTTP Server Modules

Here's a good reference:

http://www.Apex-at-work.com/2009/03/own-browser-check-condition-in-apex.html

And here is an example:

http://Apex.Oracle.com/pls/OTN/f?p=28737:7:0:

Tags: Database

Similar Questions

  • When I click on my Microsoft, it reads HTTP and 401. What should I do?

    When I click on the Microsoft trial version, I finally bought. He reads HTTP 401. What should I do?

    If you are referring to problems with Microsoft Office, they will help you in the discussion groups below:

    Office:

    http://www.Microsoft.com/Office/Community/en-us/flyoutoverview.mspx

    Office newsgroups

    http://www.Microsoft.com/Office/Community/en-us/default.mspx?DG=Microsoft.public.Office.misc&lang=en&CR=us

    Discussions of general issues of the Office.

    They will help you with your office questions when repost you in the Office discussion groups above.

    See you soon.

    Mick Murphy - Microsoft partner

  • How to set http headers when you are using the BridgeTalk HttpConnection object?

    Hello

    I'm doing http post requests from Illustrator ExtendScript (via BridgeTalk) and most of the time it works. However, the documentation on the use of HttpConnection is nonexistent and trying to find a way to set http headers. The HttpConnection object have once requestheaders and responseheaders property so I suspect it's possible.


    By default, post requests are sent with the header Content-Type "text/html", and I would like to replace so that I can use "application/x-www-formulaires-urlencoded" or "multipart/form-data".

    Here's what I have so far:

    var http = function (callback) {}

    var bt = new BridgeTalk();

    BT. Target = "bridge."

    var s = ";

    s += "if (!.). ExternalObject.webaccesslib) {\n";

    s += "ExternalObject.webaccesslib = new ExternalObject ('lib: webaccesslib');" \n » ;

    s += "}\n";

    s += "var html =" "; \n » ;

    s += "http var = new HttpConnection ('http://requestb.in/1mo0r1z1'); \n ";

    s += "http.method = 'POST'; \n » ;

    s += "http.requestheaders ="Content-Type, application/x-www-formulaires-urlencoded,"\n";

    s += "http.request = 'abc = 123 & def = 456'; \n » ;

    s += "var c = 0, t =" "; for (var i in http) {& t = (i +': ' + http [i] +'* '); c ++ ;} t =' FRONT ('+ c +):'+ t;} alert (t); \n » ; Debug: to see what properties and values exist on the http object

    s += "http.response = html; \n » ;

    s += "http.execute (); \n » ;

    s += "http.response; \n";

    s += ' var t =' AFTER:'; for (var i in http) {t += (i +': ' + http [i] +'* ') ;} alert (t);} \n » ; Debug: to see the properties and the values have been set after the execution of

    BT. Body = s;

    bt.onResult = function (evt) {}

    callback (evt);

    };

    bt.onError = function (evt) {}

    callback (evt);

    };

    BT. Send();

    };

    Things to note:

    1. If I try to set the property requestheaders as in my code above, the request fails. If I comment on him, the request succeeds. The default value for requestheaders is not set.

    2 looking at the http after a successful request object, displays the properties of reponseheaders to be on: "KeepAlive, connection, Content-Length, 2, Content-Type, text/html;" "charset = utf-8, Date, Wednesday, June 24, 2015 09:45:40 GMT, server, gunicorn/18.0, sponsored by, https://www.runscope.com, Via, vegur 1.1. Before the query runs, the responseheaders has the value undefined to.


    If someone could help me configure the request (in particular the Content-Type header) headers, I would be eternally grateful!


    Thank you


    UPDATE:

    Using the ExtendScript SDK, I discovered the responseheaders property is an array of this format: ['Connection', 'keep-alive', 'Content-Length', 2, 'Content-Type', ' text/html'...]

    I tried to put the requestheaders for the same format (I've tried both ['Content-Type', "application/x-www-formulaires-urlencoded"] and ['Connection', 'keep-alive', 'Content-Length', 2, 'Content-Type', "application/x-www-formulaires-urlencoded"...]) with no luck



    It solved!

    The key to set the content-type header is set the property http.mime as follows:

    s += "http.mime =" application/x-www-formulaires-urlencoded '; \n » ;

    Also to be complete, you can add your own custom steps headers:

    s += "http.requestheaders = ["My-sample-Header","some value"]; \n » ;

  • Generate PDFS using Managed Bean with custom HTTP headers

    Background
    Generate a report in various formats (PDF, delimited, Excel, HTML, etc.) using JDeveloper 11 g Release 2 (11.1.2.3.0) when you click on an af:commandButton. See also the version StackOverflow about this issue:

    http://StackOverflow.com/q/13654625/59087

    Problem
    The HTTP headers are sent twice: once by the framework and once by a bean.

    Source code
    The source code includes:

    -Action button
    -Managed Bean
    -Task flow

    Action button
    The action of the button:

    < af:commandButton text = 'Report' id = 'submitReport' action = "Execute" / >

    Managed bean
    The managed Bean is relatively complex. The code "responseComplete" get called, however, it does not seem to be called early enough to avoid the framework application writes the HTTP headers.

    Substitution of HTTP response header

    /**
    * Defines the HTTP headers must indicate to the browser that the
    * the report must be downloaded (not displayed in the current
    * window).
    */
    protected void setDownloadHeaders() {}
    HttpServletResponse response = getServletResponse();
    response.setHeader ("Content-Description", getContentDescription());
    response.setHeader ("Content-Disposition", 'attachment filename ='
    (+ getFilename());
    response.setHeader ("Content-Type", getContentType());
    response.setHeader ("Content-Transfer-Encoding',
    getContentTransferEncoding());
    }

    Question answer full
    The bean indirectly says infrastructure that the answer is managed (by the bean):

    getFacesContext () .responseComplete ();

    Bean, run and configure

    public void run() {}
    try {}
    Report = getReport();
    Configures (Report.GetParameters ());
    Report.Run ();
    } catch (Exception e) {}
    e.printStackTrace ();
    }
    }

    private void configuration (parameters p) {}
    p.put (ReportImpl.SYSTEM_REPORT_PROTOCOL, "http");
    p.put (ReportImpl.SYSTEM_REPORT_HOST, "localhost");
    p.put (ReportImpl.SYSTEM_REPORT_PORT, "7002");
    p.put (ReportImpl.SYSTEM_REPORT_PATH, "/ reports/rwservlet" "");
    p.put (Parameters.PARAM_REPORT_FORMAT, 'pdf');

    p.put ("report_cmdkey", getReportName());
    p.put ("report_ORACLE_1", getReportDestinationType());
    p.put ("report_ORACLE_2", getReportDestinationFormat());
    }

    Workflow
    The workflow calls Execute, which refers to the 'run()' of the bean method:

    entry-> Home-> run-> ReportBeanRun

    Where:

    <-l' call the method id = "ReportBeanRun" >
    < description > running a report < / description >
    Report to run < display name > < / display-name >
    < method > #{reportBean.run} < / method >
    < result >
    success of < fixed-result > < / fixed-results >
    < / results >
    < / method >

    The bean is assigned to the scope of the "demand", with a few managed properties:

    < rule of flow control = "__3" id >
    hand < of-activity-id > < /-activity-id >
    < control-flow-case id = "ExecuteReport" >
    run < from outcome > < / de-results >
    ReportBeanRun < to-activity-id > < / to-activity-id >
    < / control-flow-case >
    < / control-flow-rule >

    < managed-bean id = "ReportBean" >
    < description > running a report < / description >
    < display name > ReportBean < / display-name >
    application of < managed-bean-scope > < / managed-bean-scope >
    ...
    < / managed-bean >

    The "success < fixed-result > < / fixed-result > ' strikes me as wrong - I don't want to not the method call to return to another task."

    Restrictions
    The report server receives requests from the web server only. The URL of the report server cannot use browsers to download directly, for security reasons.

    Error messages
    The error message is generated:
    Duplicate received headers from the server

    349 (net::ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION) error: multiple headers received separate Content-Disposition. It is not allowed to protect themselves against HTTP response splitting attacks. Nevertheless, the report is generated. Prevents the framework to write headers HTTP would solve this problem.

    Question
    How can define you HTTP headers in ADF using a workflow to generate a PDF file by calling a managed bean?

    Ideas

    Some additional ideas:

    -Substitute the listener of the Phase of the lifecycle of Page ("ADFPhaseListener" + "PageLifecycle")
    -Develop a customized web server Servlet

    Related links
    -http://www.oracle.com/technetwork/middleware/bi-publisher/adf-bip-ucm-integration-179699.pdf
    -http://www.slideshare.net/lucbors/reports-no-notes#btnNext
    -http://www.techartifact.com/blogs/2012/03/calling-oracle-report-from-adf-applications.html?goback=%2Egde_4212375_member_102062735
    -http://docs.oracle.com/cd/E29049_01/web.1112/e16182/adf_lifecycle.htm#CIABEJFB

    Thank you!

    The problem was that the HTTP headers have been actually written twice:

    1. the report server returns the HTTP response headers.
    2. the bean was his own (as mentioned in the question) HTTP response headers.
    3. the bean was copy all the contents of the report server response, including headers, to the output stream.

    Firefox has ignored the header in double, but not Google Chrome errors.

  • Impossible to get online - reading HTTP/HTTPS/FTP Firewall problem

    I cannot get online and diagnosis to assess the problem.

    The error I get indicates that it is a firewall problem; However, when I disabled my firewall and tried to connect, it still wouldn't let me.  I ran the diagnostic and received an error message that passport.com certificate is expired.  It is said that the system could not connect over HTTP/HTTPS and FTP (passive) was able to connect.  Help, please.  Thank you!

    Sorry try this first...

    You can change the behavior of the Internet Connection Firewall by turning on various ICMP options, such as allow an incoming echo request, allow incoming timestamp request, allow incoming router requestand Allow redirect. Brief description of these options appear on the ICMP tab

    If your network uses Internet connection sharing to provide Internet access to multiple computers, it is recommended to activate the shared Internet connection on the Internet Connection Firewall. However, you can activate the shared Internet connection and Firewall Internet connection separately. It's a good idea to enable the ICF on the Internet connection on any Microsoft Windows XP computer that is connected directly to the Internet.

    Internet Connection Firewall can also help protect a single computer connected to the Internet. If you have a single computer connected to the Internet with a cable modem, a DSL modem, or a dial-up modem, Internet Connection Firewall protects your Internet connection. Do not cut the ICF for virtual private network (VPN) connections because Internet Connection Firewall interferes with file sharing and other VPN functions.

    ??????????????????????????????????????????????????????????????????????????????????????????????   OR

    http://support.Microsoft.com/kb/936211/en-us read up on that let me know if this helped.

    Internal modem

    To restart an internal modem, you must restart the computer. If you still experience network connectivity problems after you restart the computer, go to step 2. If you connect to the Internet using a router, there may be a problem with the configuration settings, and they must be updated. To determine if a network connectivity problem is caused by a bad configuration or a problem with the router, you can bypass the router and connect your computer directly to the modem.

    Warning Connect your computer directly to the Internet may be left vulnerable to attacks. To protect the computer against attacks, make sure that a firewall is installed and that the firewall is enabled on your computer. To learn more about the Windows Firewall that is included in Windows Vista, see the "Windows Firewall" section.

    Windows Firewall

    Windows Vista includes a firewall, called Windows Firewall. By default, the Windows Firewall is enabled. However, you should always check that the Windows Firewall is turned on before you connect the computer to the Internet. To verify that Windows Firewall is turned on, follow these steps:

    1. Click Startand then click Control Panel.
    2. In the search box in the upper right corner of Control Panel, type security.
    3. In the search results that appear, click the icon or the link to the Security Center. In the window that appears, you will see four bars that are titled firewall, automatic updating, malware protection, and other security settings.
    4. Click the arrow to the right in the firewall bar to expand the bar. The extended bar will display one of the following three options:
      1. If the firewall bar is green, it means that the firewall is enabled.
      2. If the firewall bar is red, you may see a message that the Windows Firewall is disabled. To turn on the Windows Firewall and cause the firewall bar to the center of safety to turn green, click activate now.
      3. If the firewall bar is red, and the message describes a problem with a third-party firewall program, we recommend that you disconnect the computer from the network and then contact the vendor of the firewall program for more information on how to activate the third-party firewall program.
  • Application of HTTP headers - only 5?

    I see a strange problem with regard to HTTP request headers.

    If we make a simple request such as:

    Connector.open("http://broken-http-stack.com/test.php").getResponseCode();
    

    on a server that simply prints the request headers in a newspaper, we might see something like this:

    host = broken-http-stack.com
    connection = close
    content-length = 0
    

    Now let's do a HTTP post request and add custom request headers:

    HttpConnection conn = (HttpConnection)Connector.open("http://broken-http-stack.com/test.php");conn.setRequestMethod("POST");
    
    URLEncodedPostData post = new URLEncodedPostData();
    
    // some form parameterspost.append("param1", "blah");post.append("param2", "foo"); 
    
    conn.setRequestProperty("User-Agent", "Awesome client 1.0");conn.setRequestProperty("X-SpecialID", "12345");conn.setRequestProperty("Content-Type", post.getContentType());
    
    conn.openOutputStream().write(post.getBytes()); 
    
    // send the requestconn.getResponseCode();
    

    Server side, I get this:

    host = broken-http-stack.comconnection = close
    user-agent = Awesome client 1.0
    X-SpecialId = 12345content-length = 64
    

    It is only 5 request headers then 6 sixth must is the content type).  At first I thought that perhaps the content-type was not an authorized request header, but I used a random name and saw the same behavior.

    Then I changed the order and course content-type appeared in the server log, but it was missing the last header (X-SpecialID).

    I tested 4.2.1 4.5 and 4.6 with the same results.  Is this a bug or I do something wrong?

    Now don't I feel stupid.  I was actually adding some headers before writing the post data and then some headers after.  It seems that, after writing the post data, no more header can be added.  The fix was simple, add all the request headers before writing the post data.  Example:

    HttpConnection conn = (HttpConnection)Connector.open(url, Connector.READ_WRITE);
    
    conn.setRequestProperty("User-Agent", getUserAgent());
    
    if (headers != null) {
       for (int i=0; i
    

    Thank you for your input marchywka.

  • OSB 10 gR 3 HTTP headers in mail flow

    All the examples I've seen involve the use of XQuery to retrieve the value of an HTTP header in a message stream. The problem is that XQuery is case sensitive and the header names are defined by the HTTP specification as case insensitive.

    For example, suppose you have defined a private header X-AB-Normal. If you place the following code in your mail flow to get the value of this header for assignment to a variable, it will only retrieve an exact match to deal on the header name.

    $inbound/ctx:transport/ctx:request/tp:headers/tp:user-header[@name="X-AB-Normal"][1]/@value

    If you work on the Iphone and use its libraries provided he changes the name of the header 'X-Ab-Normal' that does not match.
    If you work with python and use its libraries provided he changes the name of the header 'X-ab-normal', which does not.

    In both cases, we found lower level solutions on the client to make this work, i.e. force to reproduce case-sensitive, but we shouldn't have to do. To comply with HTTP standards the OSB should focus on headers in a case-insensitive manner.

    Someone knows a good way to do this?

    Would this work?

    $entrants / ctx:transport / ctx:request / tp:headers / tp: user head [tiny (@name) = 'x-ab-normal'] [1] /@value

  • Reading HTTP header in

    Hello

    I created a package and it exposed via mod_plsql and I am called by using curl , it is purely to test the code is so very simple.

    What I have to do is to read the value of the header X-HTTP-method-Override: PUT , I add on demand

    Appeal of CURL
    $ curl -i --proxy "" -H "X-HTTP-Method-Override: PUT" -X GET http://ww.sample.com/portal/my.atom.test
    procedure My.Atom.test
      procedure test as
      begin
    
        htp.p ('request_method='|| owa_util.get_cgi_env('request_method'));
        htp.p ('remote_addr='     || owa_util.get_cgi_env ('remote_addr'));
        htp.p ('remote_user='      || owa_util.get_cgi_env ('remote_user'));
        htp.p ('http_host='      || owa_util.get_cgi_env ('http_host'));
        htp.p ('server_name='      || owa_util.get_cgi_env ('server_name'));
        htp.p ('server_port='      || owa_util.get_cgi_env ('server_port'));
        htp.p ('owa_util.get_owa_service_path=' || owa_util.get_owa_service_path);
        /*
        htp.prn('PLEASE GIVE ME X-HTTP-Method-Override HERE AHHHG!!! ');
        */
        
      end test;
    Thanks in advance.

    Kind regards
    Carl

    Carl,

    This one is easy. Just make use of the PlsqlCGIEnvironmentList directive in your definition of database Access descriptor. Add the following to your DAD in mod_plsql dads.conf:

    PlsqlCGIEnvironmentList X-HTTP-METHOD-OVERRIDE

    For DAD to Application Express example, here's what I have:

    
     Order deny,allow
     PlsqlDocumentPath docs
     AllowOverride None
     PlsqlDocumentProcedure      wwv_flow_file_manager.process_download
     PlsqlDatabaseConnectString  stbdc20.us.oracle.com:1521:apx11w ServiceNameFormat
     PlsqlNLSLanguage            AMERICAN_AMERICA.AL32UTF8
     PlsqlAuthenticationMode     Basic
     SetHandler                  pls_handler
     PlsqlDocumentTablename      wwv_flow_file_objects$
     PlsqlDatabaseUsername       APEX_PUBLIC_USER
     PlsqlDefaultPage            apex
     PlsqlDatabasePassword       secret
     PlsqlSessionStateManagement StatelessWithFastResetPackageState
     #PlsqlRequestValidationFunction wwv_flow_epg_include_modules.authorize
     PlsqlCGIEnvironmentList     X-HTTP-METHOD-OVERRIDE
     Allow from all
    
    

    In this place, I can now get the value via: owa_util.get_cgi_env ('X-HTTP-METHOD-OVERRIDE")

    Joel

  • Can't see where open Live Http Headers in Firefox 6.0?

    Hello - in Firefox 6.0 I installed the addon/extension LiveHttpHeaders. However, even if I don't see that the extension is installed where I go to Addons, I don't see where in fact open LiveHttpHeaders - can someone please tell me where in Firefox 6.0 see this?

    It is on the Tools menu, and there is a toolbar button in the palette of the toolbar in the window customize.

    • Press F10, or press the Alt key to bring up the 'Menu Bar' temporarily if the menu bar is hidden.

    Open the Customize via "view > toolbars > customize" or "Firefox > Options > toolbars."

  • In the HTTP headers MIME content type - they do not exist for TIFF images

    Hello

    I think maybe it's a bug...

    In an effort to stop the client browsers of any attempt at rendering of TIF images, served upward of UCM 11g, I would change the Typte MIME to: application/octet-stream

    Supremely, a browser would see this in the HTTP header and simply provide the "OPEN or SAVE" dialog box

    Looks pretty - easy Configuration of the Complutense University of MADRID Manager, I set/modify all mime types I want. I have set to application/octet-stream .tif and .tiff. Apparently, Weblogic do NOT honor these settings.

    When I click on a PDF file, I get: application/pdf

    When I click a TXT file, I get: text/plain

    When I click on a TIF file, I get: NOTHING - no mime type specified in the header HTTP at all.

    Does anyone know featuring 11g which mime types in the stack of Weblogic/UCM? Anyone know why I can't see any type of mime when I click on a tif?

    Please let me know.

    Thank you!

    JDM

    Yes, that seems a bit heavy. Try instead the following:

    Go to the "'/user_projects/domains//config/" directory and create the following file: "

    mimemappings. Properties

    In this file add the mapping below:

    TIFF = application/octet-stream

    Save the changes and then restart the server of the University Complutense of MADRID and test to see if the problem still appears.

  • InputStreams for HTTP [S] response data: confirm a minimum memory buffer/reading early?

    I need to manage data from a web service response. The format of the response data is under my control and is returned as a stream (net.rim.device.api.crypto.tls.TLSInputStream) to my BlackBerry application. The content of the feed is an XML stream that contains simple header information and then one or more 'chunks' of data. The data is compressed (gzip) and coded (Base64). BB app must decrypt, decompress, and then process the data in the stream. For the purposes of my application, I never need all of the data at a time; processing flow for real, that's what I'm looking for. I've implemented a pipe which, in pseudocode, looks like this:

    SecureConnection httpsConn; already implemented

    InputStream httpsStream = httpsConn.openInputStream ();

    InputStream compressedStream = new (Base64InputStream.decode (httpsStream));

    InputStream is = new GZIPInputStream (compressedStream);

    int aByte = is.read ();

    The goal is to put buffer in the bit data as possible so that the operation on the side of BB is not intensive memory as the data grows. The effective implementation of this pseudo code works very well.

    The question I have is: I can confirm that the httpsStream I have created from the httpsConn is completely not himself read the BB in the specific RIM code? In other words, if there are 20 MB of data in the stream, I don't want to know that the stream has read data HTTPS completely - 20 MB all - and then put at disposal. Instead, I want to know only as much data is consumed as I makes (is.read) as well as a small buffer, perhaps, for the effectiveness of the network. A third way to ask the question: I think that it is supposed to be the definition of a well implemented InputStream, but I'm having a hard time finding a definitive '' Yes, J2ME (or BB) InputStreams promise to read HTTPS data on request and not all at once.

    I expect tons of streaming audio and video apps are partial evidence that works real data on the fly on the Net.  Still, I left the details as XML processing by SAX - it's one on the behavior of the InputStream HTTP [S].  But it brings the fourth way to phrase my question: if I use SAX instead of a tool of DOM to treat my HTML because I want to monitor the pressures of large data flows, will I get cancelled by buffering I can't control in the low-level InputStream HTTP [S]?

    Before you say, ' HTTP [S] is not where you should make streaming ", this is not streaming in itself. It is instead one - possibly large - answer to a POST.  Highly 'typical' web interaction

    If changes in response based on the version of the OS, presumably 4.6 or better is the target platform.

    Thank you!

    -Del

    I don't remember the said documentation. All I remember is that I proposed of workaround to someone on this forum and they later confirmed that he has solved the problem of buffering (they were streaming audio as great answers HTTP - streaming started to work very well, without a lot of latency).

  • When opened in Xfinity e-mail, the text becomes so tiny u cannot read.

    If I open my email account in the Explorer, the text is a good size and is readable. When I opened my e-mail via Firefox account, the text is so tiny that you can't read the headers or any other text on the page. The home page is fine to explore and firefox. The size of the text of the e-mail is Arial12. When you view the settings in Firefox, all parameters are identical to the Explorer. It just happened two days ago. So far fine any service, I used to read emails.

    See this:
    https://support.Mozilla.com/en-us/KB/page+zoom

  • How to disseminate data over HTTP

    Hi all

    Need a little bit of sense on this one because I think (and hope) it's pretty simple, but I can't for the life of understand me. Not much on the TCP/IP or HTTP protocol before am so a little out of my comfort zone.

    I'm talking to a momo SoMat Lite. There is a command that I can call in a web browser that works perfectly (from the point of view of obtaining data and to the screen): http://192.168.100.100:2345 / realtime? rate = 10 & Headers = 0

    It returns data, continuous, at my window Chrome. If I scroll down, I find that new values are written on the bottom of the page at all times. Everything is in a text format.

    Now, all I want to do is to replicate that in LabVIEW. This is where I am stuck. I tried various HTTP and TCP/IP Protocol and got more or less errors. I have attached a VI that does not work. The reasons why? I don't get errors until I get an error timeout on TCP/IP (error 56) of reading. If I run it again I get error 60 since the first VI.

    Any help gratefully received.

    Looking at the details of the HTTP protocol for the device, you have 2 options:

    (1) use the screws of HTTP Client to claim a fixed amount of data
    (2) use the screws of TCP/IP to implement a HTTP protocol that can "keepalive" the TCP connection to read data continuously

    With Option 1, the VIs HTTP will send an HTTP request and wait for a response to be sent followed by the closing of the connection device. I think that the URL you provide maintains the TCP connection alive to continue to send data (which are added continuously to the page) which probably means that the client HTTP VI will continue to read the data until the VI is to expire. You would need to ask a set amount of data every time that you run the VI of HTTP (for example 1 data point) which must be returned within the time limit of the VI of HTTP.

    I think with Option 2, you need to implement a basic HTTP request in TCP - similar to what you did but rather to send a string that is a URL, you must send a properly formatted HTTP GET request header and then to the TCP read HTTP response headers followed by your data, you will receive.

    According to Wikipedia... .the string must be formatted as follows:

    -A request line (for example GET /realtime? Rate = 10 & Headers = 0 HTTP/1.1)

    -The request headers (maybe not required... but a "Host: " line apparently is required as part of the HTTP/1.1 specification ")

    -A blank line

    -Body of the message (probably not necessary...)

    If you use the CRLF of the PCT read mode, you should get a reading by line of HTTP headers (which cannot be sent by the device - I guess that's what the headers = 0 is for) followed by a reading by row of data (as you saw by accessing it via the browser).

    If you use some of the tools in your browser (for example in chrome - tools-> tools development-> Network tab) - you can usually see the raw HTTP sent/received data when you access the URL you provided.

  • How to write a program that allows an HTTPs connection to the APACHE TOMCAT server in blackberry JDE

    Hello.. I am very new to the blackberry JDE environment. But then, I have a project in which I should write a program that will make an HTTPs connection to the apache tomcat server using blackberry JDE. The simulator which I use is 8330-JDE.

    Here is my code...

    import java.io.IOException;

    Import java.io.InputStream;

    Import javax.microedition.io.Connector;

    Import javax.microedition.io.HttpsConnection;

    Import net.rim.device.api.ui.UiApplication;

    Import net.rim.device.api.ui.container.MainScreen;

    public class Httproto extends UiApplication

    {

    public public static void main (String [] args)

    {

    Httproto instance = new Httproto();

    instance.enterEventDispatcher ();

    }

    public Httproto()

    {

    pushScreen (new HttpsConnectionScreen());

    }

    }

    final class HttpsConnectionScreen extends screen

    {

    public HttpsConnectionScreen()

    {

    HttpsConnection c = null;

    InputStream is = null;

    int rc;

    try {String url =

    "https://192.168.2.3: 8443/cit/j_acegi_security_check? j_username = sanogo & j_password = redhat;

    c = (HttpsConnection) Connector.open (url);

    c.setRequestMethod (HttpsConnection.POST);

    System.out.println ("connection is open with the server");

    Get the response code is open the connection,

    Send the request and read HTTP response headers.

    The headers are stored until asked.

    RC = c.getResponseCode ();

    System.out.println ("response from the server" + rc);

    if (rc! = HttpsConnection.HTTP_OK) {

    throw new IOException ("HTTP response code:" + rc);

    }

    is = c.openInputStream ();

    Get the ContentType

    The string of type = c.getType ();

    The length and process data

    int len = (int) c.getLength ();

    if (len > 0) {

    int actual = 0;

    int BytesRead = 0;

    byte data = new byte[len]; while ((bytesread! = len) & (real! = - 1)) {

    real = is.read (data, bytesread, len - bytesread);

    bytesRead += real;

    }

    } else {}

    int ch;

    while ((ch = is.read (())! = - 1). {

    }

    }

    } catch (ClassCastException e) { throw new IllegalArgumentException ("not a HTTP URL");}

    }

    catch (IOException ioe) {}

    finally {

    Try

    {

    if (is! = null)

    is. Close();

    if (c! = null)

    c.Close ();

    }

    catch (IOException ioe) {}

    }

    }

    }

    When I run this program in the Simulator, I can do nothing. Please correct me if I'm wrong in coding.

    As I am new to this blackberry JDE environment, ideas and suggestions on how to write and run the sample applications in the blackberry are more welcomed.

    Concerning

    Hinduja

    Make sure that your MDS starts when the Simulator starts.  In the JDE will in Edition > Preferences > Simulator > General and click the checkbox "launch Mobile Data System connection with Simulator Service.

  • Property request http

    Hello guys '

    I have a problem. My application creates the HTTP request.

    So I need to know how to get the value of some items of property. These products are used to set HTTP headers.

    These elements are:

    "x rim-bsm-id".

    'Profile '.

    "x-wap-profile".

    "Accept."

    "x-Rim-by default-charset".

    "Accept."

    "x-Rim-by default-charset".

    x rim-image-line.

    "Accept-Charset".

    "Accept-Language".

    "User-Agent".

    "x rim-transcode-content".

    "Host".

    "x rim-gw-properties".

    In other words:

    httpConn.setRequestProperty (' x-rim-bsm-id ","HOW GET?"" ");
    httpConn.setRequestProperty ("profile", "HOW GET?");
    httpConn.setRequestProperty ("x-wap-profile","HOW GET?" "");
    httpConn.setRequestProperty ("Accept", "HOW GET?");
    httpConn.setRequestProperty (' x-Rim-by default-charset "," ISO-8859-1 "" ");
    httpConn.setRequestProperty (' x-rim-image-threshold ","HOW GET?"" ");
    httpConn.setRequestProperty ("Accept-Charset", "ISO-8859-1,UTF-8,US-ASCII,UTF-16BE,windows-1252,UTF-16LE,windows-1250");
    httpConn.setRequestProperty ("Accept-Language", "en-GB, fr; q = 0.5 ");
    httpConn.setRequestProperty ("User-Agent","HOW GET?" ");
    httpConn.setRequestProperty (' x-rim-transcode-content ","HOW GET?"" ");
    httpConn.setRequestProperty ("Host", "HOSTNAME");
    httpConn.setRequestProperty (' x-rim-gw-properties ","HOW GET?"" ");

    HOW to GET? -I don't know those signed items.

    Please help me guys

    The only one of general interest, as far as I KNOW is the profile and I don't think I've ever found a place for everything

    read it - I had for his construction of the information platform and profile agent version information.

    I don't know if there is anyway to get x-wap-profile browser either.

    All others should be deducted from your goals - if you know what you are doing these generally

    fill themselves.  You can get some ideas from hunting around the site of the ietf, for example,

    http://www.google.com/search?hl=en&FKT=2904&fsdt=10685&q=site%3Aietf.org+mime+types+Accept&aq=f&OQ=

    Headers x draw probably specifications API such as RIM transcoding etc.

Maybe you are looking for

  • How to re - combine a HD and SSD in a player of "Fusion".

    Hi all Well, this process has floored me know how much time lost, he created and how the problem occurred in the first place. I am wanting to do a clean install of El Capitan on iMac late 2014 retina with El Capitan with a 1 TB drive merger 10.11.6.

  • P2-1317cb: Office upgrade p2-1317cb

    I bought this computer several years ago... now that I parked in Korea.I put internet with speed of 1 g, but this computer built in the NIC with support speed 10 m / 100 mSo I tried lan card usb supported the bite 1 g...but this lan usb card works on

  • Why can't I get my WoW to work?

    I din't had no problem with it until I put windows 7 on it and now it says I need a battle.net login... I already have a.

  • Using resource monitor to connect remotely to another PC

    Hello Is it possible to use the resource monitor in Windows 7 and 8 to connect to another Windows computer and know what is happening on it remotely? The monitor has a whole wealth of information that would be useful for troubleshooting other machine

  • question when you click Server tab in the console

    Hi am in weblogic 10.6.0 so I have a problem when I click on the server tab in my console it takes long to open tab mybe 30 mins and she no longer display this error message in redA server is a WebLogic Server instance that runs in its own Machine vi