JeanSebTr / open-webkit-sharp

Automatically exported from code.google.com/p/open-webkit-sharp
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Print starts a new session #56

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Access some page where a cookie-based login is required (SSL is a plus).
2. Call .Print()
3. Watch the login page being printed because you've been redirected!

- What is the expected output? What do you see instead?

I expected to see the page printed.

- Please provide any additional information below.

My test page was a ASP.NET MVC application using Forms Authentication 
(cookie-based). Also, you have to be logged to access any page. If I call 
.Print() method on the WebKitBrowser, it'll start a new connection for it (or 
at least a new session), destroying the session ID I have - then, redirected to 
the login page, it'll print it.

Original issue reported on code.google.com by cado...@gmail.com on 5 Jan 2012 at 4:51

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Nevermind, I forgot to check r112. I didn't test here, but by looking the code 
it looks like this might be fixed.

Original comment by cado...@gmail.com on 5 Jan 2012 at 5:04

GoogleCodeExporter commented 9 years ago
One think that I noticed now: saving the file might not be enough. Consider 
that you have a complex document with relative paths, like "/foo/jquery.js": it 
won't work because you can't include that file. So documents will need full 
path on all included files.

Original comment by cado...@gmail.com on 5 Jan 2012 at 5:09

GoogleCodeExporter commented 9 years ago
I know that prinitng is a bit buggy because I was unable to implement the 
WebKit method for printing. I will find a way to download all needed files to 
the temp folder but this might also work as expected, since for the log in 
cookies are also important.

Original comment by tsumalis96@gmail.com on 5 Jan 2012 at 5:16

GoogleCodeExporter commented 9 years ago
how can I display a print dialog to print html content like Chrome?

Original comment by CL.chenj...@gmail.com on 2 Jun 2015 at 6:14