Search Results

Search found 15228 results on 610 pages for 'literature request'.

Page 12/610 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • https google urlshortener request missing body

    - by Peter
    Hi, Just trying to get the new API for the goo.gl URL shortening service working on my iPhone, following the instructions on http://code.google.com/apis/urlshortener/v1/getting_started.html I'm set up and the API is enabled etc., but when I send a request in the recommended format: POST https://www.googleapis.com/urlshortener/v1/url Content-Type: application/json {"longUrl": "http://www.google.com/"} I get an error returned. The error is exactly the one listed on that page in the errors section for if you haven't passed in a longURL param. This makes me think that I'm not setting up the body of the POST request properly. Here's the code if you have any pointers... NSString *longURLString=@"http://www.stackoverflow.com"; NSString *googlRequestString=@"https://www.googleapis.com/urlshortener/v1/url"; NSMutableURLRequest *request=[NSMutableURLRequest requestWithURL:[NSURL URLWithString:googlRequestString]]; [request setHTTPMethod:@"POST"]; [request addValue:@"application/json" forHTTPHeaderField:@"Content-Type:"]; NSString *bodyString=[NSString stringWithFormat:@"{\"longUrl\": \"%@\"}",longURLString]; [request setHTTPBody:[bodyString dataUsingEncoding:NSUTF8StringEncoding]]; NSURLResponse *theResponse; NSError *error=nil; NSData *receivedData=[NSURLConnection sendSynchronousRequest:request returningResponse:&theResponse error:&error]; NSString *receivedString=[[NSString alloc] initWithData:receivedData encoding:NSUTF8StringEncoding]; NSLog(@"Received data: %@",receivedString); [receivedString release]; The NSLog returns: Received data: { "error": { "errors": [ { "domain": "global", "reason": "required", "message": "Required", "locationType": "parameter", "location": "resource.longUrl" } ], "code": 400, "message": "Required" } } which is exactly what Google says you get if you have not passed a longUrl parameter.... My guess is I'm missing something very obvious here :-) P

    Read the article

  • Http handler for classic ASP application for introducing a layer between client and server

    - by JPReddy
    I've a huge classic ASP application where in thousands of users manage their company/business data. Currently this is not multi-user so that application users can create users and authorize them to access certain areas in the system. I'm thinking of writing a handler which will act as middle man between client and server and go through every request and find out who the user is and whether he is authorized to access the data he is trying to. For the moment ignore about the part how I'm going to check the authorization and all that stuff. Just want to know whether I can implement a ASP.net handler and use it as middle man for the requests coming for a asp website? I just want to read the url and see what is the page user is trying to access and what are the parameters he is passing in the url the posted data. Is this possible? I read that Asp.net handler cannot be used with asp website and I need to use isapi filter or extensions for that and that can be developed only c/c++. Can anybody through some light on this and guide me whether I'm in the right direction or not?

    Read the article

  • IIS 6 SSL Restore from PFX without Deleting Pending Request

    - by Sev
    I requested a new SSL certificate from a certificate authority, but until they process it my site is losing business. Before doing so, I had backed up the original certificate to a PFX file. Now when I try to restore the backup, it forces me to delete it, or process the request. Since the new one isn't ready yet, is there any way to restore the backup, without deleting the request? Or will it cause any issues if I delete the request to install the new one when it comes in? Server is IIS 6

    Read the article

  • DNS Server Spoofed Request Amplification DDoS - Prevention

    - by Shackrock
    I've been conducting security scans, and a new one popped up for me: DNS Server Spoofed Request Amplification DDoS The remote DNS server answers to any request. It is possible to query the name servers (NS) of the root zone ('.') and get an answer which is bigger than the original request. By spoofing the source IP address, a remote attacker can leverage this 'amplification' to launch a denial of service attack against a third-party host using the remote DNS server. General Solution: Restrict access to your DNS server from public network or reconfigure it to reject such queries. I'm hosting my own DNS for my website. I'm not sure what the solution is here... I'm really looking for some concrete detailed steps to patch this, but haven't found any yet. Any ideas? CentOS5 with WHM and CPanel. Also see: http://securitytnt.com/dns-amplification-attack/

    Read the article

  • Apache, Django with mod_wsgi, and large request buffering

    - by Mukul
    In my setup of Apache 2.2 MPM worker and Django 1.3 with mod_wsgi 2.8, I need to support large POST request payloads. The problem is that when there are many such simultaneous requests, Apache uses up all the memory in the system and then crashes. It seems that Apache is buffering the requests completely in memory before executing the WSGI handler and passing it the request. Is there any way to control request buffering in Apache? The log shows the following error whenever the crash happens: [Wed Jun 29 18:35:27 2011] [error] cgid daemon process died, restarting Here's my virtual host's configuration: <VirtualHost *:8080> ServerName example.com ErrorLog /var/log/apache2/error.log WSGIScriptAlias / <path to django.wsgi> WSGIPassAuthorization on WSGIDaemonProcess example.com WSGIProcessGroup example.com XSendFileAllowAbove on XSendFile on </VirtualHost>

    Read the article

  • send apache request identifier to backend when using mod_rewrite

    - by Jose L Martinez-Avial
    I'm using mod_rewrite to send requests from the client to a backend server. I've seen in the rewrite log that Apache sets a sid (Session Identifier?) and rid (request identifier?) and shows them in the logs. Would it be possible to send the rid to the backend server as a http header? that way I can link a request in the apache with a request in the backend server. [localhost/sid#7f48e8ad2968][rid#7f48e8e634c8/initial] (3) ... Thanks

    Read the article

  • NginX : Route user request to backend

    - by xperator
    The goal is to have NginX webserver act as a very basic & simple load balancer/fail-over. But instead of fetching static files from backend and serving it to user, I just want to route/redirect user request to one of the back end servers. upstream backend { server server1.example.com:80; server server2.example.com:80; server server3.example.com:80; } location / { proxy_pass http://backend; } Instead of : User request (example.com/test.file) NginX LB Backend NginX LB User I want to have : User request (example.com/test.file) NginX LB Backend User Is this even possible with NginX ? If not then How can I achieve this goal. UPDATE 1: Is there a way to use rewrite directive with backend upstream ? UPDATE 2: It's not really necessary to use NginX. I just want to have a direct reply from backend to user.

    Read the article

  • Persistent Spot Instance Request with CloudFormation

    - by PapelPincel
    Is it possible to create "Persistent Spot Instance" with AWS CloudFormation ? I'm going through the Autoscale and EC2 CloudFormation's template references but there is no mention how to set a property so the Spot requests stay persistent. When the price bid lower than the actual spot price AWS brings the instances down. I would like the instances to be started automatically when the instance price is cheaper again. This can be set manually when creating a new spot instance request by checking the option "Persistent Request" in the "Request Instances Wizard".

    Read the article

  • How to dump ASP.NET Request headers to string

    - by FreshCode
    I'd like to email myself a quick dump of a GET request's headers for debugging. I used to be able to do this in classic ASP simply with the Request object, but Request.ToString() doesn't work. And the following code returned an empty string: using (StreamReader reader = new StreamReader(Request.InputStream)) { string requestHeaders = reader.ReadToEnd(); // ... // send requestHeaders here }

    Read the article

  • Django: Generating a queryset from a GET request

    - by Nimmy Lebby
    I have a Django form setup using GET method. Each value corresponds to attributes of a Django model. What would be the most elegant way to generate the query? Currently this is what I do in the view: def search_items(request): if 'search_name' in request.GET: query_attributes = {} query_attributes['color'] = request.GET.get('color', '') if not query_attributes['color']: del query_attributes['color'] query_attributes['shape'] = request.GET.get('shape', '') if not query_attributes['shape']: del query_attributes['shape'] items = Items.objects.filter(**query_attributes) But I'm pretty sure there's a better way to go about it.

    Read the article

  • amazon product advertising api - item lookup request working example

    - by I__
    would anyone have a working example of an amazon ITEMLOOKUP ? i have the following code but it does not seem to work: string ISBN = "0393326381"; string ASIN = ""; if (!(string.IsNullOrEmpty(ISBN) && string.IsNullOrEmpty(ASIN))) { AWSECommerceServicePortTypeChannel service = new AWSECommerceServicePortTypeChannel(); ItemLookup lookup = new ItemLookup(); ItemLookupRequest request = new ItemLookupRequest(); lookup.AssociateTag = secretKey; lookup.AWSAccessKeyId = accessKeyId; if (string.IsNullOrEmpty(ASIN)) { request.IdType = ItemLookupRequestIdType.ISBN; request.ItemId = new string[] { ISBN.Replace("-", "") }; } else { request.IdType = ItemLookupRequestIdType.ASIN; request.ItemId = new string[] { ASIN }; } request.ResponseGroup = new string[] { "OfferSummary" }; lookup.Request = new ItemLookupRequest[] { request }; response = service.ItemLookup(lookup); if (response.Items.Length > 0 && response.Items[0].Item.Length > 0) { Item item = response.Items[0].Item[0]; if (item.MediumImage == null) { //bookImageHyperlink.Visible = false; } else { //bookImageHyperlink.ImageUrl = item.MediumImage.URL; } //bookImageHyperlink.NavigateUrl = item.DetailPageURL; //bookTitleHyperlink.Text = item.ItemAttributes.Title; //bookTitleHyperlink.NavigateUrl = item.DetailPageURL; if (item.OfferSummary.LowestNewPrice == null) { if (item.OfferSummary.LowestUsedPrice == null) { //priceHyperlink.Visible = false; } else { //priceHyperlink.Text = string.Format("Buy used {0}", item.OfferSummary.LowestUsedPrice.FormattedPrice); //priceHyperlink.NavigateUrl = item.DetailPageURL; } } else { //priceHyperlink.Text = string.Format("Buy new {0}", item.OfferSummary.LowestNewPrice.FormattedPrice); //priceHyperlink.NavigateUrl = item.DetailPageURL; } if (item.ItemAttributes.Author != null) { //authorLabel.Text = string.Format("By {0}", string.Join(", ", item.ItemAttributes.Author)); } else { //authorLabel.Text = string.Format("By {0}", string.Join(", ", item.ItemAttributes.Creator.Select(c => c.Value).ToArray())); } /* ItemLink link = item.ItemLinks.Where(i => i.Description.Contains("Wishlist")).FirstOrDefault(); if (link == null) { //wishListHyperlink.Visible = false; } else { //wishListHyperlink.NavigateUrl = link.URL; } * */ } } } the problem is with this: thisshould be defined differently but i do not know how AWSECommerceServicePortTypeChannel service = new AWSECommerceServicePortTypeChannel();

    Read the article

  • Replacement for HttpContext.Current.Request.ServerVariables["SERVER_NAME"] in Integrated Mode

    - by Donniel
    Hi, Using HttpContext.Current.Request.ServerVariables["SERVER_NAME"] in integrated mode gives an error in IIS7 as per: http://mvolo.com/blogs/serverside/archive/2007/11/10/Integrated-mode-Request-is-not-available-in-this-context-in-Application%5F5F00%5FStart.aspx Is there a replacement I can use in global.asax code for HttpContext.Current.Request.ServerVariables["SERVER_NAME"]? This would be similar to using String strPath = HttpContext.Current.Server.MapPath(HttpRuntime.AppDomainAppVirtualPath); instead of //String strPath = HttpContext.Current.Server.MapPath(HttpContext.Current.Request.ServerVariables["PATH_INFO"]);

    Read the article

  • Detect if HTTP request is from browser / Flex asynchronous request?

    - by Andree
    Hi there! When Flex application make an asynchronus HTTP request, does it add a special header to the request, like some JavaScript framework does? Something that indicates whether this request is an AJAX call/not. I just want my server side code to return different response format, depending on whether the request is made from browser/flex. Regards, Andree.

    Read the article

  • POST request from Python to PHP

    - by RainbowHat
    Python params = urllib.parse.urlencode({'spam': '1', 'eggs': '2', 'bacon': '3'}) binary_data = params.encode('utf-8') reg = urllib.request.Request("http://www.abc.com/abc/smart/ap/request/",binary_data) reg.add_header('Content-Type','application/x-www-form-urlencoded') f = urllib.request.urlopen(reg) print(f.read()) PHP if($_SERVER['REQUEST_METHOD'] == 'POST') { //parse_str($_SERVER['QUERY_STRING']); var_dump($_SERVER['QUERY_STRING']); } When i try print binary_data , it does show the parameter but by the time it reaches the PHP , i see nothing. Any idea?

    Read the article

  • monitor http traffic from non-browser

    - by Ananth
    hi, I want to monitor http request generated out of a exe. Is there any tool that can help me? Actually, an exe would call my asp.net web page to register a user. The exe constructs the request with all the data in it. when the request reaches my web page, I don't see any data. I wan to monitor the Request object and the traffic to find the reality. Any help is appreciated. Thanks. Ananth

    Read the article

  • JSP getParameter problem

    - by user236501
    I have a form, if the timer reach the form will auto redirect to the Servlet to update database. My problem now is if javascript redirect the window to servlet my request.getParameter is null. function verify(f,whichCase){ if(whichCase == "Submit"){ msg = "Are you sure that you want to submit this test?"; var i = confirm(msg) if(i){ parent.window.location = "sindex.jsp" } return i; } } I doing this because i got a iframe in my jsp. Timer update problem have to use iframe. So, when time up or user click submit parent.window.location can let me refresh parent window <form method="POST" action="${pageContext.request.contextPath}/TestServlet" onSubmit="return verify(this,whichPressed)"> My form when user click submit button within the timing, it will trigger the verify function to let user confirm submit. So inside my TestServlet i got this, because using javascript redirect request.getParameter("answer") this keep return me null. protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { if (request.getParameter("Submit") != null) { String ans = request.getParameter("answer"); Answer a = new Answer(ans, no); aa.CreateAnswer(an,t.getTestCode(),username); RequestDispatcher rd = request.getRequestDispatcher("/sindex.jsp"); rd.forward(request, response); } } Below are my timer when time up redirect to TestServlet trigger the doGet method if((mins == 0) && (secs == 0)) { window.alert("Time is up. Press OK to submit the test."); // change timeout message as required var sUrl = "TestServlet"; parent.window.location = sUrl // redirects to specified page once timer ends and ok button is pressed } else { cd = setTimeout("redo()",1000); }

    Read the article

  • Handling a Long Running jsp request on the server using Ajax and threads

    - by John Blue
    I am trying to implement a solution for a long running process on the server where it is taking about 10 min to process a pdf generation request. The browser bored/timesout at the 5 mins. I was thinking to deal with this using a Ajax and threads. I am using regular javascript for ajax. But I am stuck with it. I have reached till the point where it sends the request to the servlet and the servlet starts the thread.Please see the below code public class HelloServlet extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet { protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { System.out.println("POST request!!"); LongProcess longProcess = new LongProcess(); longProcess.setDaemon(true); longProcess.start(); request.getSession().setAttribute("longProcess", longProcess); request.getRequestDispatcher("index.jsp").forward(request, response); } } class LongProcess extends Thread { public void run() { System.out.println("Thread Started!!"); while (progress < 10) { try { sleep(2000); } catch (InterruptedException ignore) {} progress++; } } } Here is my AJax call <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html><head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>My Title</title> <script language="JavaScript" > function getXMLObject() //XML OBJECT { var xmlHttp = false; xmlHttp = new XMLHttpRequest(); //For Mozilla, Opera Browsers return xmlHttp; // Mandatory Statement returning the ajax object created } var xmlhttp = new getXMLObject(); //xmlhttp holds the ajax object function ajaxFunction() { xmlhttp.open("GET","HelloServlet" ,true); xmlhttp.onreadystatechange = handleServerResponse; xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); xmlhttp.send(null); } function handleServerResponse() { if (xmlhttp.readyState == 4) { if(xmlhttp.status == 200) { document.forms[0].myDiv.value = xmlhttp.responseText; setTimeout(ajaxFunction(), 2000); } else { alert("Error during AJAX call. Please try again"); } } } function openPDF() { document.forms[0].method = "POST"; document.forms[0].action = "HelloServlet"; document.forms[0].submit(); } function stopAjax(){ clearInterval(intervalID); } </script> </head> <body><form name="myForm"> <table><tr><td> <INPUT TYPE="BUTTON" NAME="Download" VALUE="Download Queue ( PDF )" onclick="openPDF();"> </td></tr> <tr><td> Current status: <div id="myDiv"></div>% </td></tr></table> </form></body></html> But I dont know how to proceed further like how will the thread communicate the browser that the process has complete and how should the ajax call me made and check the status of the request. Please let me know if I am missing some pieces. Any suggestion if helpful.

    Read the article

  • proxy: pass request body failed

    - by bux
    I'm trying to enable proxy virtualhost: <VirtualHost *:80> ServerName xxxxx.domain.tdl SSLProxyEngine On SSLProxyCheckPeerCN on ProxyPass / https://localhost:1234 ProxyPassReverse / https://localhost:1234 </VirtualHost> But i've an 500 err and my error.log (apache2) display: [Tue Jan 03 15:41:42 2012] [error] (502)Unknown error 502: proxy: pass request body failed to [::1]:1234 (localhost) [Tue Jan 03 15:41:42 2012] [error] proxy: pass request body failed to [::1]:1234 (localhost) from 82.252.xxx.xx () Missing some parameters ?

    Read the article

  • Request time out error

    - by Neo
    Hi Today i came across strange problem whenever i try to pinging to my server works properly but whenever i send http request from browser the request time out happens. can anybody help me to resolve this issue.

    Read the article

  • Apache maximum request number 256?

    - by victor hugo
    I have a very good server running an Apache instance with mod_jk for proxying the request to an Application server. I'm doing a load test and although I'm sending over 600 requests, the status worker keep showing this: 256 requests currently being processed, 0 idle workers I'm using 'prefork MPM' <IfModule prefork.c> ServerLimit 2048 StartServers 5 MinSpareServers 5 MaxSpareServers 10 MaxClients 1000 MaxRequestsPerChild 0 </IfModule> Is there a compiled limit for Apache to handle just 256 request or what would I be missing?

    Read the article

  • “X_FORWARDED_FOR” Header Doesn't Present In The Request

    - by Radi
    In my web application I need to extract the real ip address for clients behind proxy, after searching I found that the possible method to do that is to read the content of "X_FORWARDED_FOR" header , I am using java servlet and the headers of the incoming request doesn't contain "X_FORWARDED_FOR" header , So why the header doesn't included in the request? I am using java 1.7 , tomcat v7 , proxy server :TMG and configured to use "X_FORWARDED_FOR" header . Please advice. Thanks in advance.

    Read the article

  • Domino 8.5.3 forward room reservation request to external email

    - by Cividan
    I have created a room reservation database on my notes server. Now my problem is that we have 2 company that will use this room and I would like to forward the meeting request sent to this room to external email address so that the other company email server receive the reservation request and update the calendar on their side to see the accurate availability of the room. How can I achive this. Thanks !

    Read the article

  • Wake On LAN on request

    - by honzas
    Hi, I have a small home network with the router capable of running OpenWRT, is there some utility or firewall rule, which can be used to Wake On LAN on request. What I think - if I want to access my media centre (using for example SSH or HTTP) and it is suspended, is it possible to catch the ICMP packet (saying the machine is offline) and send the WOL packet to wakeup the machine and resend the SSH or HTTP request? Thanks

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >