Not getting Results with INDY components

702 views
Skip to first unread message

MetalGeorge

unread,
Dec 24, 2009, 9:21:03 AM12/24/09
to Fiddler
Guys,

i've a small.. program that uploads a file to an http site using the
PUT method, it's implemented with Delphi 2007 and INDY (idHTTP)
components 9.

WIth HTTP the file uploads fine (CODE 201) with HTTPS it doesn't
(CODE 400) i need to check on what's going on, i've tried a lot of
sniffers with no luck... fiddler looked really promissing but i'm not
getting results either.

can anyone help me out with this ?


Regards


George

EricLaw

unread,
Dec 25, 2009, 1:45:38 PM12/25/09
to Fiddler
What does "not getting results" mean?

If you're not seeing ANY of the Indy traffic, did you start Fiddler
before starting your program?

Did you configure Indy to use the local proxy (127.0.0.1:8888)?
http://www.indyproject.org/KB/index.html?howdoiuseaproxywithindy.htm

If you're only seeing a HTTPS CONNECT, did you configure your machine
to trust the Fiddler Root certificate?
http://www.fiddler2.com/fiddler/help/httpsdecryption.asp

-Eric

Jorge Escobar

unread,
Dec 28, 2009, 8:37:58 AM12/28/09
to httpf...@googlegroups.com
Yeap, i'm not seeing ANY of the INDY traffic
1. checked i started fiddler before my program
2. i don't understand why should i use Indy with the local proxy. So fiddler being "the-man-on-the-middle" ?
anyways i did, i've only a http1.request.httpconnection string, but i used it anyways with same results
3. nop i haven't added the certificate to trust fiddler, but i'm not getting even the HTTPS CONNECT

I've been testing, and if i add some break lines in the XML it suddenly works, i wonder if the content-length is being some-how modified when it gets encrypted.

Any other thoughts ?

---- i'm adding the code for the function i'm using. I believe it's pretty straight forward:

var sResponse: String;
    streamResponse: TStringstream;
    fsParams: TFileStream;
    IdHTTP: TIdHTTP;
    FUrl: TIdURI;
    FIdSSL : TIdSSLIOHandlerSocketOpenSSL;
    FHTTPClient: TIdHTTP;
    DEPATH,URL:STRING;
        AFileName:string;
begin
  URL:=Edit2.text;
  AFileName:=Edit1.Text;
  DEpath:='c:\windows\temp\' + Afilename;
  memo1.Lines.Add('BEGIN');
  FUrl := TIdURI.Create(URL);
  IdHTTP := TIdHTTP.Create(nil);
  idHttp.Request.ProxyConnection:='127.0.0.1:8888';
  IdHTTP.ReadTimeout := 10000;
  memo1.Lines.Add('CREATE URL, HTTP');
  FIdSSL := TIdSSLIOHandlerSocketOpenSSL.Create(nil);
  IdHTTP.IOHandler := FIdSSL;
  IdHTTP.Request.BasicAuthentication := True;
  memo1.Lines.Add('SSL');
fsParams := TFileStream.Create('C:\WINDOWS\Temp\' + Edit1.text, fmOpenRead or fmShareDenyWrite);
try
        IdHTTP.Request.ContentType := 'text/xml';
        streamResponse:= TStringStream.Create('');
memo1.Lines.Add('SEND FILE ');
        IdHTTP.Put(edit2.text + '/' + Edit1.text, fsParams, Streamresponse);
        ShowMessage(Streamresponse.DataString);
        IdHTTP.Destroy;
      except
      on E: Exception do
      ShowMessage('Error encountered during HTTP REQUEST: ' + E.Message);
    end;
end;


2009/12/25 EricLaw <bay...@gmail.com>

--

You received this message because you are subscribed to the Google Groups "Fiddler" group.
To post to this group, send email to httpf...@googlegroups.com.
To unsubscribe from this group, send email to httpfiddler...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/httpfiddler?hl=en.



Jorge Escobar

unread,
Dec 28, 2009, 9:13:24 AM12/28/09
to httpf...@googlegroups.com
One other thing, i'm not getting any of the Firefox browser either, only Chrome and IE.

Regards

J

2009/12/28 Jorge Escobar <jorgees...@gmail.com>

EricLaw

unread,
Dec 28, 2009, 1:39:08 PM12/28/09
to Fiddler
First things first. Fiddler *is* a proxy, which is why I've suggested
that you need to set the proxy for the INDY components. The INDY
documentation shows a different syntax for setting the proxy than
you're using.

It suggests:

HTTP1.ProxyParams.ProxyServer := '127.0.0.1';
HTTP1.ProxyParams.ProxyPort := 8888;

Like (apparently) INDY, Firefox doesn't use the default system proxy,
which is why you need to use the FiddlerHook plugin (shown in
Firefox's status bar after Fiddler is installed) to configure Firefox
to send traffic to Fiddler.

On Dec 28, 6:13 am, Jorge Escobar <jorgeescobar...@gmail.com> wrote:
> One other thing, i'm not getting any of the Firefox browser either, only
> Chrome and IE.
>
> Regards
>
> J
>

> 2009/12/28 Jorge Escobar <jorgeescobar...@gmail.com>

> >> httpfiddler...@googlegroups.com<httpfiddler%2Bunsubscribe@googlegr­oups.com>


> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/httpfiddler?hl=en.
>
> >  --
> > You received this message because you are subscribed to the Google Groups
> > "Fiddler" group.
> > To post to this group, send email to httpf...@googlegroups.com.
> > To unsubscribe from this group, send email to

> > httpfiddler...@googlegroups.com<httpfiddler%2Bunsubscribe@googlegr­oups.com>


> > .
> > For more options, visit this group at

> >http://groups.google.com/group/httpfiddler?hl=en.- Hide quoted text -
>
> - Show quoted text -

Jorge Escobar

unread,
Dec 29, 2009, 10:44:20 AM12/29/09
to Fiddler
Well, right... i was missing the fact that it's a Proxy as IE and Chrome got their traffic without any other settings changed, sorry 'bout that.

I've tried to do so i can finally see  HTTP  traffic but with HTTPS i get the error ERROR CONNECTING WITH SSL,maybe it has something to do with the certificates ? the port for https 8888 works fine from my browser (i've already added the certificate)

but we are getting close.

Any other thoughts Eric ?


BTW: i really appreciate the effort you are putting into this, i'm sure it will also help some other people one day :)

Regards


Jorge

2009/12/28 EricLaw <bay...@gmail.com>
To unsubscribe from this group, send email to httpfiddler...@googlegroups.com.

EricLaw

unread,
Dec 29, 2009, 1:37:16 PM12/29/09
to Fiddler
Sorry, I can't tell... have you configured Windows to trust your root
certificate?

What's the exact error message you get out of INDY?

Do you see a CONNECT tunnel created in Fiddler?

> > > >http://groups.google.com/group/httpfiddler?hl=en.-Hide quoted text -

Jorge Escobar

unread,
Dec 29, 2009, 9:14:22 PM12/29/09
to Fiddler
1. yeap, i added DO_NOT_TRUST_fiddlerroot from personal certificates to trusted
2. 
this is the message:
"Module Load: NETAPI32.dll. No Debug Info. Base Address: $5B860000. Process MainForm.exe (1752)
Module Unload: NETAPI32.dll. Process MainForm.exe (1752)
First chance exception at $7C812AFB. Exception class EIdOSSLConnectError with message 'Error connecting with SSL.'. Process MainForm.exe (1752)"
3. nop i can't see a CONNECT tunnel created (which i can see from other HTTPS sites such as hotmail)

Maybe i need to export the certificate and tell the client to use it? i'll try that tonight.

Thanks

J


2009/12/29 EricLaw <bay...@gmail.com>
To unsubscribe from this group, send email to httpfiddler...@googlegroups.com.

EricLaw

unread,
Dec 30, 2009, 11:01:46 AM12/30/09
to Fiddler
If you view the same page in IE on the client machine in question, do
you see a certificate error?

Exporting a site certificate will not help you.

> > > > > >http://groups.google.com/group/httpfiddler?hl=en.-Hidequoted text

Jorge Escobar

unread,
Jan 5, 2010, 6:56:44 AM1/5/10
to Fiddler
if i view the same page in IE i don't see any errors.

2009/12/30 EricLaw <bay...@gmail.com>
To unsubscribe from this group, send email to httpfiddler...@googlegroups.com.

EricLaw

unread,
Jan 5, 2010, 1:25:29 PM1/5/10
to Fiddler
The latest versions of Fiddler require the client to use SSLv3+. The
older versions (2.2.7.5 and earlier) allow SSLv2 connections. Which
version of Fiddler are you using?

Is there a standalone version of this application I could have a look
at? Or could you send me a Netmon log? (www.fiddler2.com/redir/?
id=netmon

> > > > > > > >http://groups.google.com/group/httpfiddler?hl=en.-Hidequotedtext

> ...
>
> read more »- Hide quoted text -

Reply all
Reply to author
Forward
0 new messages