Search Results

Search found 22318 results on 893 pages for 'mike post'.

Page 8/893 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • why nginx rewrite post request from /login to //login?

    - by jiangchengwu
    There is a if statement, which will rewrite url when the client is Android. Everything ok. But, something got strange. Nginx will write post request /login to //login, even if the block of if statement is bank. So I got a 404 page. As the jetty server only accept /login request. Server conf: location / { proxy_pass http://localhost:8785/; proxy_set_header Host $http_host; proxy_set_header Remote-Addr $http_remote_addr; proxy_set_header X-Real-IP $remote_addr; if ( $http_user_agent ~ Android ){ # rewrite something, been commented } } Debug info, origin log https://gist.github.com/3799021 ... 2012/09/28 16:29:49 [debug] 26416#0: *1 http script regex: "Android" 2012/09/28 16:29:49 [notice] 26416#0: *1 "Android" matches "Android/1.0", client: 106.187.97.22, server: ireedr.com, request: "POST /login HTTP/1.1", host: "ireedr.com" ... 2012/09/28 16:29:49 [debug] 26416#0: *1 http proxy header: "POST //login HTTP/1.0 Host: ireedr.com X-Real-IP: 106.187.97.22 Connection: close Accept-Encoding: identity, deflate, compress, gzip Accept: */* User-Agent: Android/1.0 " ... 2012/09/28 16:29:49 [debug] 26416#0: *1 HTTP/1.1 404 Not Found Server: nginx/1.2.1 Date: Fri, 28 Sep 2012 08:29:49 GMT Content-Type: text/html;charset=ISO-8859-1 Transfer-Encoding: chunked Connection: keep-alive Cache-Control: must-revalidate,no-cache,no-store Content-Encoding: gzip ... Only when I commented the block in the configration file: location / { proxy_pass http://localhost:8785/; proxy_set_header Host $http_host; proxy_set_header Remote-Addr $http_remote_addr; proxy_set_header X-Real-IP $remote_addr; #if ( $http_user_agent ~ Android ){ # #} } The client can get an 200 response. Debug info, origin log https://gist.github.com/3799023 ... "POST /login HTTP/1.0 Host: ireedr.com X-Real-IP: 106.187.97.22 Connection: close Accept-Encoding: identity, deflate, compress, gzip Accept: */* User-Agent: Android/1.0 " ... 2012/09/28 16:27:19 [debug] 26319#0: *1 HTTP/1.1 200 OK Server: nginx/1.2.1 Date: Fri, 28 Sep 2012 08:27:19 GMT Content-Type: application/json;charset=UTF-8 Content-Length: 17 Connection: keep-alive ... As the log: 2012/09/28 16:29:49 [notice] 26416#0: *1 "Android" matches "Android/1.0", client: 106.187.97.22, server: ireedr.com, request: "POST /login HTTP/1.1", host: "ireedr.com" 2012/09/28 16:29:49 [debug] 26416#0: *1 http script if 2012/09/28 16:29:49 [debug] 26416#0: *1 post rewrite phase: 4 2012/09/28 16:29:49 [debug] 26416#0: *1 generic phase: 5 2012/09/28 16:29:49 [debug] 26416#0: *1 generic phase: 6 2012/09/28 16:29:49 [debug] 26416#0: *1 generic phase: 7 2012/09/28 16:29:49 [debug] 26416#0: *1 access phase: 8 2012/09/28 16:29:49 [debug] 26416#0: *1 access phase: 9 2012/09/28 16:29:49 [debug] 26416#0: *1 access phase: 10 2012/09/28 16:29:49 [debug] 26416#0: *1 post access phase: 11 2012/09/28 16:29:49 [debug] 26416#0: *1 try files phase: 12 2012/09/28 16:29:49 [debug] 26416#0: *1 posix_memalign: 0000000001E798F0:4096 @16 2012/09/28 16:29:49 [debug] 26416#0: *1 http init upstream, client timer: 0 2012/09/28 16:29:49 [debug] 26416#0: *1 epoll add event: fd:13 op:3 ev:80000005 2012/09/28 16:29:49 [debug] 26416#0: *1 http script copy: "Host: " 2012/09/28 16:29:49 [debug] 26416#0: *1 http script var: "ireedr.com" 2012/09/28 16:29:49 [debug] 26416#0: *1 http script copy: " " 2012/09/28 16:29:49 [debug] 26416#0: *1 http script copy: "" 2012/09/28 16:29:49 [debug] 26416#0: *1 http script copy: "" 2012/09/28 16:29:49 [debug] 26416#0: *1 http script copy: "X-Real-IP: " 2012/09/28 16:29:49 [debug] 26416#0: *1 http script var: "106.187.97.22" 2012/09/28 16:29:49 [debug] 26416#0: *1 http script copy: " " 2012/09/28 16:29:49 [debug] 26416#0: *1 http script copy: "Connection: close " 2012/09/28 16:29:49 [debug] 26416#0: *1 http proxy header: "Accept-Encoding: identity, deflate, compress, gzip" 2012/09/28 16:29:49 [debug] 26416#0: *1 http proxy header: "Accept: */*" 2012/09/28 16:29:49 [debug] 26416#0: *1 http proxy header: "User-Agent: Android/1.0" 2012/09/28 16:29:49 [debug] 26416#0: *1 http proxy header: "POST //login HTTP/1.0 Host: ireedr.com X-Real-IP: 106.187.97.22 Connection: close Accept-Encoding: identity, deflate, compress, gzip Accept: */* User-Agent: Android/1.0 " ... Maybe post rewrite phase had rewrite the request. Anybody can help me to solve this problem or know why nginx do that ? Much appreciated.

    Read the article

  • HttpClient POST fails to submit the form + resulting string is cut-off (incomplete)

    - by Jayomat
    Hi, I'm writing an app to check for the bus timetable's. Therefor I need to post some data to a html page, submit it, and parse the resulting page with htmlparser. Though it may be asked a lot, can some one help me identify if 1) this page does support post/get (I think it does) 2) which fields I need to use? 3) How to make the actual request? this is my code so far: String url = "http://busspur02.aseag.de/bs.exe?Cmd=RV&Karten=true&DatumT=30&DatumM=4&DatumJ=2010&ZeitH=&ZeitM=&Suchen=%28S%29uchen&GT0=&HT0=&GT1=&HT1="; String charset = "CP1252"; System.out.println("startFrom: "+start_from); System.out.println("goTo: "+destination); //String tag.v List<NameValuePair> params = new ArrayList<NameValuePair>(); params.add(new BasicNameValuePair("HTO", start_from)); params.add(new BasicNameValuePair("HT1", destination)); params.add(new BasicNameValuePair("GTO", "Aachen")); params.add(new BasicNameValuePair("GT1", "Aachen")); params.add(new BasicNameValuePair("DatumT", day)); params.add(new BasicNameValuePair("DatumM", month)); params.add(new BasicNameValuePair("DatumJ", year)); params.add(new BasicNameValuePair("ZeitH", hour)); params.add(new BasicNameValuePair("ZeitM", min)); UrlEncodedFormEntity query = new UrlEncodedFormEntity(params, charset); HttpPost post = new HttpPost(url); post.setEntity(query); InputStream response = new DefaultHttpClient().execute(post).getEntity().getContent(); // Now do your thing with the facebook response. String source = readText(response,"CP1252"); Log.d(TAG_AVV,response.toString()); System.out.println("STREAM "+source); EDIT: This is my new code: try { HttpClient client = new DefaultHttpClient(); String getURL = "http://busspur02.aseag.de/bs.exe?SID=5FC39&ScreenX=1440&ScreenY=900&CMD=CR&Karten=true&DatumT="+day+"&DatumM="+month+"&DatumJ="+year+"&ZeitH="+hour+"&ZeitM="+min+"&Intervall=60&Suchen=(S)uchen&GT0=Aachen&T0=H&HT0="+start_from+"&GT1=Aachen&T0=H&HT1="+destination+""; HttpGet get = new HttpGet(getURL); HttpResponse responseGet = client.execute(get); HttpEntity resEntityGet = responseGet.getEntity(); if (resEntityGet != null) { //do something with the response Log.i("GET RESPONSE",EntityUtils.toString(resEntityGet)); } } catch (Exception e) { e.printStackTrace(); } But the output file is cut-off. If I do the same request in a browser I get like 14 different routes. Now the file suddenly stops and I only get 3 routes.... what's wrong? 04-30 12:19:12.362: INFO/GET RESPONSE(256): <!-- Ausgabebereich (automatisch erzeugt) --> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <div align="center"> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <p></p> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <p>Ihr Fahrplan für die Verbindung von Aachen, Kaiserplatz nach Aachen, Karlsgraben am Freitag, den 30.04.2010 (Koniginnedag), Abfahrten ab 12:19 Uhr</p> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <table class="Result"> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <tr> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <th class="fussnote">Fussnote</th> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <th class="fahrzeug">Fahrzeug</th> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <th class="abfahrt">Abfahrt</th> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <th class="haltestellean">Haltestelle</th> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <th class="linie">Linie</th> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <th class="haltestelleab">Haltestelle</th> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <th class="ankunft">Ankunft</th> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <th class="fahrzeit">Fahrzeit/Tarif</th> 04-30 12:19:12.362: INFO/GET RESPONSE(256): </tr> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <tr> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <td>&nbsp;</td><td>&nbsp;<img src="http://www.busspur.de/logos/efa-bus.gif" title="Niederflurbus"></td><td>12:23</td><td title="lc0">Aachen, Kaiserplatz [Heinrichsalle Ri. Hansemannplatz]&nbsp;<a href="http://download.avv.de/Umgebungsplaene/hlp_ac_kaiserplatz.pdf">Umgebungsplan</a></td><td>45</td><td title="lc0">Aachen, Karlsgraben&nbsp;<a href="http://download.avv.de/Umgebungsplaene/hlp_ac_karlsgraben.pdf">Umgebungsplan</a></td><td>12:34</td><td>00:11 /  1,00</td><td>&nbsp;</td> 04-30 12:19:12.362: INFO/GET RESPONSE(256): </tr> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <tr><td colspan="9"><a href="/bs.exe?RI=0&amp;SID=5FC39">Fahrtbegleiter</a>&nbsp;&nbsp;</td></tr> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <tr><td colspan="9"><hr></td></tr> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <tr> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <td>&nbsp;</td><td>&nbsp;<img src="http://www.busspur.de/logos/efa-bus.gif" title="Niederflurbus"></td><td>12:26</td><td title="lc0">Aachen, Kaiserplatz [Heinrichsalle Ri. Hansemannplatz]&nbsp;<a href="http://download.avv.de/Umgebungsplaene/hlp_ac_kaiserplatz.pdf">Umgebungsplan</a></td><td>22</td><td title="lc0">Aachen, Karlsgraben&nbsp;<a href="http://download.avv.de/Umgebungsplaene/hlp_ac_karlsgraben.pdf">Umgebungsplan</a></td><td>12:37</td><td>00:11 /  1,00</td><td>&nbsp;</td> 04-30 12:19:12.362: INFO/GET RESPONSE(256): </tr> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <tr><td colspan="9"><a href="/bs.exe?RI=1&amp;SID=5FC39">Fahrtbegleiter</a>&nbsp;&nbsp;</td></tr> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <tr><td colspan="9"><hr></td></tr> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <tr> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <td>&nbsp;</td><td>&nbsp;<img src="http://www.busspur.de/logos/efa-bus.gif" title="Niederflurbus"></td><td>12:28</td><td title="lc0">Aachen, Kaiserplatz [Heinrichsalle Ri. Hansemannplatz]&nbsp;<a href="http://download.avv.de/Umgebungsplaene/hlp_ac_kaiserplatz.pdf">Umgebungsplan</a></td><td>25</td><td title="lc0">Aachen, Karlsgraben&nbsp;<a href="http://download.avv.de/Umgebungsplaene/hlp_ac_karlsgraben.pdf">Umgebungsplan</a></td><td>12:39</td><td>00:11 /  1,00</td><td>&nbsp;</td> 04-30 12:19:12.362: INFO/GET RESPONSE(256): </tr> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <tr><td colspan="9"><a href="/bs.exe?RI=2&amp;SID=5FC39">Fahrtbegl

    Read the article

  • Post data to MVC3 controller without pagerefresh

    - by Smooth
    I have this script that basically has 4 select boxes, what I want is that for the 2 top select boxes, he submits the optionvalue that is selected to an action (which can be found at "ProductKoppeling/ProductKoppelingPartial"), I want to let him submit this data when I click on an option but without page refresh. I tried JSON and I tried Ajax, but I didn't get it working.. How should i do this? <script language="javascript" type="text/javascript"> function delete_1() { var answer = confirm("U staat op het punt dit product te verwijderen, wilt u doorgaan?") if (answer) { document.getElementById('Actie_1').value = '5'; document.getElementById('hpg_submit').submit(); } } function delete_2() { var answer = confirm("U staat op het punt dit product te verwijderen, wilt u doorgaan?") if (answer) { document.getElementById('Actie_2').value = '6'; document.getElementById('pg_submit').submit(); } } function delete_3() { var answer = confirm("U staat op het punt dit product te verwijderen, wilt u doorgaan?") if (answer) { document.getElementById('Actie_3').value = '6'; document.getElementById('p_submit').submit(); } } </script> <div style="width: 500px; float: left;"> @using (Html.BeginForm("ProductKoppelingPartial", "ProductKoppeling", FormMethod.Post, new { id = "onload_submit" })) { @Html.DropDownList("Klant.Id", (ViewBag.Klant as SelectList), new { onchange = "document.getElementById('onload_submit').submit()" }) } <div style="clear: both"></div> <div style="float: left;"> <b>Hoofdgroepen</b><br /> @using (Html.BeginForm("ProductKoppelingPartial", "ProductKoppeling", FormMethod.Post, new { id = "hpg_submit" })) { if (ViewBag.SelectedKlant != null) { <input type="hidden" name="Klant.Id" value="@ViewBag.SelectedKlant.Id" /> } <select style="width: 200px;" size="6" id="HoofdProductGroep" name="HoofdProductGroep.Id" onchange="document.getElementById('hpg_submit').submit();"> @foreach (var hpg in ViewBag.HoofdProductGroep) { if (ViewBag.SelectedHPG != null) { if (hpg.Id == ViewBag.SelectedHPG.Id) { <option value="@hpg.Id" selected="selected">@hpg.Naam</option> } else { <option value="@hpg.Id">@hpg.Naam</option> } } else { <option value="@hpg.Id">@hpg.Naam</option> } } </select> <input type="hidden" name="Actie" id="Actie_1" value="0" /> <br /> <img src="../../Content/toevoegen.png" style="cursor: pointer; width: 30px;" onclick="document.getElementById('Actie_1').value='1';document.getElementById('hpg_submit').submit();" /> <img src="../../Content/bewerken.png" style="cursor: pointer; float: none; width: 30px;" onclick="document.getElementById('Actie_1').value='2';document.getElementById('hpg_submit').submit();" /> <img src="../../Content/verwijderen.png" style="cursor: pointer; float: none; width: 30px;" onclick="delete_1()" /> } </div> <div style="float: right;"> <b>Groepen</b><br /> @using (Html.BeginForm("ProductKoppelingPartial", "ProductKoppeling", FormMethod.Post, new { id = "pg_submit" })) { if (ViewBag.SelectedHPG != null) { <input type="hidden" name="HoofdProductGroep.Id" value="@ViewBag.SelectedHPG.Id" /> } if (ViewBag.SelectedKlant != null) { <input type="hidden" name="Klant.Id" value="@ViewBag.SelectedKlant.Id" /> } <select size="6" style="width: 200px;" id="ProductGroep_Id" name="ProductGroep.Id" onchange="document.getElementById('pg_submit').submit();"> @foreach (var pg in ViewBag.ProductGroep) { if (ViewBag.SelectedPG != null) { if (pg.Id == ViewBag.SelectedPG.Id) { <option value="@pg.Id" selected="selected">@pg.Naam</option> } else { <option value="@pg.Id">@pg.Naam</option> } } else { <option value="@pg.Id">@pg.Naam</option> } } </select> <input type="hidden" name="Actie" id="Actie_2" value="0" /> <br /> <img src="../../Content/toevoegen.png" style="cursor: pointer; width: 30px;" onclick="document.getElementById('Actie_2').value='3';document.getElementById('pg_submit').submit();" /> <img src="../../Content/bewerken.png" style="cursor: pointer; float: none; width: 30px;" onclick="document.getElementById('Actie_2').value='4';document.getElementById('pg_submit').submit();" /> <img src="../../Content/verwijderen.png" style="cursor: pointer; float: none; width: 30px;" onclick="delete_2()" /> } </div> <div style="clear: both; height: 25px;"></div> @using (Html.BeginForm("Save", "ProductKoppeling", FormMethod.Post, new { id = "p_submit" })) { <div style="float: left"> <b>Producten</b><br /> <select size="18" style="width: 200px;" name="Product.Id"> @foreach (var p in ViewBag.Product) { <option value="@p.Id">@p.Naam</option> } </select> @if (ViewBag.SelectedPG != null) { if (ViewBag.SelectedPG.Id != null) { <input type="hidden" name="ProductGroep.Id" value="@ViewBag.SelectedPG.Id" /> } } <input type="hidden" name="Actie" id="Actie_3" value="0" /> <br /> <img src="../../Content/toevoegen.png" style="cursor: pointer; width: 30px;" onclick="document.getElementById('Actie_3').value='1';document.getElementById('p_submit').submit();" /> <img src="../../Content/bewerken.png" style="cursor: pointer; float: none; width: 30px;" onclick="document.getElementById('Actie_3').value='2';document.getElementById('p_submit').submit();" /> <img src="../../Content/verwijderen.png" style="cursor: pointer; float: none; width: 30px;" onclick="delete_3()" /> <br /> </div> <div style="float: left; width: 100px;"> <center> <br /><br /><br /><br /> <a style="cursor: pointer; float: none; color: blue; font-size: 30px;" onclick="document.getElementById('p_submit').submit();">»</a> <br /><br /><br /><br /><br /><br /><br /><br /><br /> <a style="cursor: pointer; float: none; color: blue; font-size: 30px;" onclick="document.getElementById('pgp_submit').submit();">«</a> </center> </div> } <div style="float: right;"> <b>Producten in groepen</b><br /> @using (Html.BeginForm("Delete", "ProductKoppeling", FormMethod.Post, new { id = "pgp_submit" })) { <select size="18" style="width: 200px;" name="ProductGroepProduct.Id"> @foreach (var pgp in ViewBag.ProductGroepProduct) { if (pgp != null) { if (pgp.Product != null) { <option value="@pgp.Id">@pgp.Product.Naam</option> } } } </select> } </div>

    Read the article

  • Mike Cohn-style burndown charts in JIRA

    - by Fuzzy Purple Monkey
    We use Jira/Greenhopper for our project planning/tracking. The built-in graphs are great, but when a new issue/story is added during a project, the whole burn-down graph moves up rather than increasing the part of the graph when the issue was added. Ideally I'd like to generate a Mike Cohn-style burndown graph, which shows a hump when new issues are added. Does anyone know of any plugins that support this, or been able to extract this data directly from the database?

    Read the article

  • Delphi: problem with httpcli (ICS) post method

    - by www.yegorov-p.ru
    Hello I am using HttpCli component form ICS to POST a request. I use an example that comes with the component. It says: procedure TForm4.Button2Click(Sender: TObject); var Data : String; begin Data:='status=no'; HttpCli1.SendStream := TMemoryStream.Create; HttpCli1.SendStream.Write(Data[1], Length(Data)); HttpCli1.SendStream.Seek(0, 0); HttpCli1.RcvdStream := TMemoryStream.Create; HttpCli1.URL := Trim('http://server/something'); HttpCli1.PostAsync; end; But it fact, it sends not status=no but s.t.a.t.u I can't understand, where is the problem. Maybe someone can show an example, how to send POST request with the help of HttpCli component? PS I can't use Indy =)

    Read the article

  • PHP4 HTTP Post without cURL

    - by Luke
    I have the following code that works on PHP5 to send a HTTP POST without using cURL. I would like this to work on PHP 4.3.0 and above: $opts = array('http' => array( 'method' => 'POST', 'header' => "Content-type: application/x-www-form-urlencoded\r\n" . "Content-Type: application/json\r\n", 'content' => $query ) ); $context = stream_context_create($opts); $result = file_get_contents($url, false, $context); HTTP context is only supported on PHP5. Is there anyway to make this work with PHP 4.3.0 - I need a fallback method if PHP5 or cURL is not installed.

    Read the article

  • Java: Read POST data from a socket on an HTTP server

    - by danpalmer
    I have a website (python/django) that needs to use a load of Java resources that may or may not be on the same server. Therefore I am writing a mini webserver in Java that will receive a request and then when processing is finished, POST some data back to a url on the site. I have got the java code receiving connections on sockets and responding with some simple HTML. My problem is that I will POST data to the Java server and that code needs to act on the data. How do I go about reading the data that is posted in the HTML request, if it is even possible. If not, is there any other way you would do this. If you think I am going about this in completely the wrong way then please tell me and I will consider another method, but after conversing with some Java developers, this seemed like the best way for what I was doing. Thanks

    Read the article

  • ASP.net post and default page.

    - by diamandiev
    Scenario: I have a regular aspx page with a form. When someone clicks a button the form submitted via post like normal. HOWEVER. The page where the form resides is the default page(Default.aspx). So when someone goes to the site: http://site.com/ and submits the forms he gets redirected to http://site.com/default.aspx. I tried setting the action of the form to http://site.com/. However asp.net does not allow to use root urls with a POST. So is there any workaround? Ajax is not an option.

    Read the article

  • PHP: POST Request to ASP.NET website results in 500 server error when html tags included

    - by RyanJD
    My situation: I need to send text to an ASP.NET web service using POST. The entire page there is a form: <form name="aspnetForm" method="post" action="Discussion.aspx?classroom=lG39il1cotOAGJwiNvmQlIPfwmjikD%2fAHLhjjGInAZQ%3d&amp;Page=Posts&amp;ID=794239&amp;Sort=&amp;SortOrder=" id="aspnetForm"> So, I figured if I sent a POST request to this form with the correct inputs it would work. And, to an extent, it has. The form inputs are as follows: <input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" /> <input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" /> <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDw..." /> <input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWYQLrt..." /> And a bunch of other inputs. The code I have used is as follows: // grab form info $inputs = extract_form_inputs($discussion['body']); $inputs['__EVENTTARGET'] = 'ctl00$cphMain$ctl01$btnSubmit'; $inputs['ctl00$cphMain$ctl01$tbNickname'] = "Your Instructor"; $inputs['ctl00$cphMain$ctl01$reMessage'] = $message; // submit form $r = request_send($discussion['url'], $inputs); extract_form_inputs does exactly that. $discussion['body'] is the content of the page. $discussion['url'] is the URL of the page. request_send has two arguments: ($url, $post_array). It performs rawurlencode on each element of the array and joins them up as keypairs, in the same way as http_build_query. The request is url encoded properly, sent to the correct page, and works fine until I insert html tags. I have checked - the 'greater than' and 'less than' symbols ('<' and '') are url-encoded properly. However, the server responds with a 500 error. It accepts any other text. Has anyone else come across this sort of problem? Is there some setting on an ASP.NET server that denies html? I can't see this being the case - there is a rich text editor on the website that I am sending requests to. This text editor performs the same request as I am, only I am doing it remotely. The rich text editor sends html to the form - I have checked that, too, using javascript. Note: I do not have the power to modify the ASP.NET server.

    Read the article

  • Upload file with POST method on Qt4

    - by mosg
    Hello! I'm looking for a basic code samples of how to upload files to server with HTTP POST method on Qt. My task: I have simple Qt program and I need to select any image file from the local host and upload it to the server. The selection part and GUI is simple and I have already done it, but with POST uploading I'm confused. In addition I have to say, that there is no authorization to upload file. If someone already looking this topic? PS: the reason why I'm asking and not coding my self is time, I need to get this method quick. Thank you, all success solutions from my side will be posted here for others.

    Read the article

  • Re-send POST request easily - what tools?

    - by Fabien
    I am looking for an easy way to re-send POST request to the server within the browser mainly for debug purposes. Say you have a XHR request which contains POST parameters that is to be send to the server. After having changed the script on the server side, you would like to resent the very same request for analyzing the output. What tool could help? I guess it is a browser's extension. I already tried extension Tamper Data for Firefox which does the job as you can "Replay in browser". But for my taste, it is not enough straight forward, as there are 3 - 4 clicks to get the result of the request. Unfortunately, curl would not be suitable for my needs as my application has a session's cookie.

    Read the article

  • POST with HTTPBuilder -> NullPointerException?

    - by Stefan Kendall
    I'm trying to make a simple HTTP POST request, and I have no idea why the following is failing. I tried following the examples here, and I don't see where I'm going wrong. Exception java.lang.NullPointerException at groovyx.net.http.HTTPBuilder$RequestConfigDelegate.setBody(HTTPBuilder.java:1131) ... Code def List<String> search(String query, int maxResults) { def http = new HTTPBuilder("mywebsite") http.request(POST) { uri.path = '/search/' body = [string1: "", query: "test"] requestContentType = URLENC headers.'User-Agent' = 'Mozilla/5.0 Ubuntu/8.10 Firefox/3.0.4' response.success = { resp, InputStreamReader reader -> assert resp.statusLine.statusCode == 200 String data = reader.readLines().join() println data } } [] }

    Read the article

  • PHP: How to check if query string or POST vars contain same var twice

    - by thomasrutter
    It may sound strange, but in my PHP application I need to check if the same variable name has been declared more than once in the query string or POST variables, and return an error value if this is the case. If my application doesn't return an error in this case, it fails a compliance check. When accessing vars using $_GET, $_POST, etc, PHP only returns the last value given for each variable name. I can't find a way to tell if any variable appeared more than once. I simply need to find out if the query string or the variables in the POST body contained the same variable name more than once, whatever the values.

    Read the article

  • Send jQuery array to PHP post?

    - by FFish
    I have a javascript function that gathers two arrays, imagepaths and captions. I want to send with PHP's post to the same page $_SERVER['PHP_SELF'], but I really don't know where to start.. PHP: if (isset($_POST['Submit'])) { $edit_photos->update_xml($edit_photos->album_id, $_POST['src_arr'], $_POST['caption_arr']); // prevent resending data header("Location: " . $_SERVER['PHP_SELF'] . "?ref=" . $ref); } JS: function getImgData() { var imgData = { 'src_arr': [], 'caption_arr': []}; $('.album img').each(function(index){ imgData.src_arr.push($(this).attr('src')); imgData.caption_arr.push($(this).attr('alt')); }); return imgData; }; HTML: <form name="form1" method="post" action="<?php echo $_SERVER['PHP_SELF'] . "?ref=" . $ref; ?>">

    Read the article

  • jQuery $.post with PasteBin API

    - by John K
    Ok, I'm trying to use jQuery $.post with the PasteBin API to create a PasteBin page and grab the URL (which the API says it returns). Here is my code so far: $('#send_code').click(function(){ $.post('http://pastebin.com/api_public.php', { paste_name: $('#paste_name').val(), paste_code: $('#paste_code').val() }, function(data){ alert(data); }); } The above script creates the page just fine (I can find them on PasteBin). However, all that is returned is an empty string. I've tried using this same API with php and cURL, and I'm able to retrieve the URL just fine. Can anyone see if I'm doing something wrong? Thanks!

    Read the article

  • iPhone Development: Use POST to submit a form

    - by Mario
    I've got the following html form: <form method="post" action="http://shk.ecomd.de/up.php" enctype="multipart/form-data"> <input type="hidden" name="id" value="12345" /> <input type="file" name="pic" /> <input type="submit" /> </form> And the following iPhone SDK Submit method: - (void)sendfile { UIImage *tempImage = [UIImage imageNamed:@"image.jpg"]; NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init]; [request setHTTPMethod:@"POST"]; [request setURL:[NSURL URLWithString:@"http://url..../form.php"]]; NSString *boundary = @"------------0xKhTmLbOuNdArY"; NSString *contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@",boundary]; [request addValue:contentType forHTTPHeaderField: @"Content-Type"]; NSMutableData *body = [NSMutableData data]; [body appendData:[[NSString stringWithFormat:@"\r\n%@\r\n",boundary] dataUsingEncoding:NSASCIIStringEncoding]]; [body appendData:[@"Content-Disposition: form-data; name=\"id\"\r\n\r\n" dataUsingEncoding:NSASCIIStringEncoding]]; [body appendData:[@"12345" dataUsingEncoding:NSUTF8StringEncoding]]; [body appendData:[[NSString stringWithFormat:@"\r\n%@\r\n",boundary] dataUsingEncoding:NSASCIIStringEncoding]]; [body appendData:[@"Content-Disposition: form-data; name=\"pic\"; filename=\"photo.png\"\r\n" dataUsingEncoding:NSASCIIStringEncoding]]; [body appendData:[@"Content-Type: application/octet-stream\r\n\r\n" dataUsingEncoding:NSASCIIStringEncoding]]; [body appendData:[NSData dataWithData:UIImageJPEGRepresentation(tempImage, 90)]]; [body appendData:[[NSString stringWithFormat:@"\r\n%@",boundary] dataUsingEncoding:NSASCIIStringEncoding]]; // setting the body of the post to the reqeust [request setHTTPBody:body]; NSError *error; NSURLResponse *response; NSData* result = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error]; NSString* aStr = [[[NSString alloc] initWithData:result encoding:NSASCIIStringEncoding] autorelease]; NSLog(@"Result: %@", aStr); [request release]; } This does not work, but I have no clue why. Can you please help me?!! What am I doing wrong?

    Read the article

  • Sending html data via $post fails

    - by Neil
    I am using the code below which is fine but when I use the code below that in an attempt to send an html fragment to a processing page to save it as a file but I get nothing. I have tried using ajax with processData set to false ads dataTypes of html, text and xml but nothing works. I can't find anything on this so I guess I must be missing something fairly trivial but I've been at it for 3 hours now. This works $.post("SaveFile.aspx", {f: "test4.htm", c: "This is a test"}, function(data){ alert(data); }, "text"); This fails $.post("SaveFile.aspx", {f: "test4.htm", c: "<h1>This is a test</h1>"}, function(data){ alert(data); }, "text");

    Read the article

  • JQuery post not working when moving web-app to a win server 2003

    - by karl
    I have build a webapplication using ASP.NET MVC and JQuery. On my local machine this works fine,but when moving it to a Windows server 2003 the JQuery method post stops working. I'm also using the load method and this works fine. function methodOne(id) { alert("debug1: <%= Url.Action( "MethodOne", "controller" ) + "/" %>" + id); $.post <%= Url.Action( "MethodOne", "controller" ) + "/" %>" + id, function(data) { alert("debug2"); ... } else { alert("Debugg: Add presentation to user failed"); } }); } The debug2 is never outputed. $('#panel').load("<%= Url.Action( "Method", "Controller" ) %"); Works fine.

    Read the article

  • How to get JSON back from HTTP POST Request (to another domain)

    - by roman m
    I'm trying to use the API on a website, here's the part of the manual: Authenticated Sessions (taken from here) To create an authenticated session, you need to request an authToken from the '/auth' API resource. URL: http://stage.amee.com/auth (this is not my domain) Method: POST Request format: application/x-www-form-urlencoded Response format: application/xml, application/json Response code: 200 OK Response body: Details of the authenticated user, including API version. Extra data: "authToken" cookie and header, containing the authentication token that should be used for subsequent calls. Parameters: username / password Example Request POST /auth HTTP/1.1 Accept: application/xml Content-Type: application/x-www-form-urlencoded username=my_username&password=my_password Response HTTP/1.1 200 OK Set-Cookie: authToken=1KVARbypAjxLGViZ0Cg+UskZEHmqVkhx/Pm...; authToken: 1KVARbypAjxLGViZ0Cg+UskZEHmqVkhx/PmEvzkPGp...== Content-Type: application/xml; charset=UTF-8 QUESTION: How do I get that to work? I tried jQuery, but it seems to have problem with XSS. Actual code snippet would be greatly appreciated. p.s. All I was looking for was WebClient class in C#

    Read the article

  • CI pagination, POST problem

    - by Gwood
    Okay, I am pretty new in CI and I am stuck on pagination. I am performing this pagination on a record set that is result of a query. Now everything seems to be working fine. But there’s some problem probably with the link. I am displaying 10 results per page. Now if the results are less than 10 then it’s fine. Or If I pull up the entire records in the table it works fine. But in case the result is more than 10 rows, then the first 10 is perfectly displayed, and when I click on the pagination link to get to the next page the next page displays the rest of the results from the query as well as, other records in the table. ??? I am confused.. Any help?? Here’s the model code I am using .... function getTeesLike($field,$param) { $this-db-like($field,$param); $this-db-limit(10, $this-uri-segment(3)); $query=$this-db-get(‘shirt’); if($query-num_rows()0){ return $query-result_array(); } } function getNumTeesfromQ($field,$param) { $this-db-like($field,$param); $query=$this-db-get(‘shirt’); return $query-num_rows(); } And here’s the controller code .... $KW=$this-input-post(‘searchstr’); $this-load-library(‘pagination’); $config[‘base_url’]=‘http://localhost/cit/index.php/tees/show/’; $config[‘total_rows’]=$this-T-getNumTeesfromQ(‘Title’,$KW); $config[‘per_page’]=‘10’; $this-pagination-initialize($config); $data[‘tees’]=$this-T-getTeesLike(‘Title’,$KW); $data[‘title’]=‘Displaying Tees data’; $data[‘header’]=‘Tees List’; $data[‘links’]=$this-pagination-create_links(); $this-load-view(‘tee_res’, $data); //What am I doing wrong here ???? Pls help ... I guess the problem is with the $KW=$this-input-post(‘searchstr’); .. Because if I hard code a value for $KW it works fine. May be I should use POST differently ..but how do I pass the value from the form without POSTING it , its CI so not GET ... ??????

    Read the article

  • Parsing a list of dictionaries passed as a POST parameter

    - by andyashton
    I have a list of python dictionaries that look like this: sandwiches = [ {'bread':'wheat', 'topping':'tomatoes', 'meat':'bacon'}, {'bread':'white', 'topping':'peanut butter', 'meat':'bacon'}, {'bread':'sourdough', 'topping':'cheese', 'meat':'bacon'} ] I want to pass this as a POST parameter to another Django app. What does the client app need to do to iterate through the list? I want to do something like: for sandwich in request.POST['sandwiches']: print "%s on %s with %s is yummy!" % (sandwich['meat'], sandwich['bread'], sandwich['topping']) But I don't seem to have a list of dicts when my data arrives at my client app.

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >