[09:59:33 CDT(-0500)] <athena> EricDalquist: do you know what the best way to check this new codebase into a new branch of the web proxy portlet is?
[09:59:46 CDT(-0500)] <EricDalquist> so you just have a bunch of code?
[09:59:51 CDT(-0500)] <athena> yeah
[10:00:04 CDT(-0500)] <athena> can i just run git init, add the existing repo as a remote and check it into a branch that way?
[10:00:14 CDT(-0500)] <athena> or do i need to clone the project, delete everything, and copy this stuff over?
[10:00:17 CDT(-0500)] <EricDalquist> git probably has a fancy way of doing it ...
[10:00:25 CDT(-0500)] <athena> seems like it should
[10:00:26 CDT(-0500)] <athena>
[10:00:36 CDT(-0500)] <athena> it has fanciness for everything
[10:01:09 CDT(-0500)] <EricDalquist> so a non cool git way would be:
[10:01:09 CDT(-0500)] <EricDalquist> create branch in existing project
[10:01:09 CDT(-0500)] <EricDalquist> git rm -r *
[10:01:09 CDT(-0500)] <EricDalquist> cp -r your new code into the branch
[10:01:09 CDT(-0500)] <EricDalquist> git add .
[10:01:10 CDT(-0500)] <EricDalquist> git commit
[10:01:20 CDT(-0500)] <EricDalquist> if you want I can look into a fancy git way
[10:02:06 CDT(-0500)] <athena> yeah i'd considered doing that
[10:02:14 CDT(-0500)] <athena> are we fine with just doing that?
[10:02:22 CDT(-0500)] <athena> i'm not sure if it really matters since this new codebase is so different
[10:02:28 CDT(-0500)] <EricDalquist> yup
[10:02:30 CDT(-0500)] <athena> but didn't want to just do it in case we had concerns
[10:02:32 CDT(-0500)] <EricDalquist> I'm fine with doing that
[10:02:36 CDT(-0500)] <athena> ok, lets just keep things easy then
[10:02:45 CDT(-0500)] <athena> i am ok with being uncool.
[10:02:56 CDT(-0500)] <athena>
[10:03:03 CDT(-0500)] <EricDalquist> oh wait
[10:03:21 CDT(-0500)] <EricDalquist> git checkout --orphan NEWBRANCH
[10:03:28 CDT(-0500)] <athena> magic!
[10:03:40 CDT(-0500)] <EricDalquist> then do
[10:03:40 CDT(-0500)] <EricDalquist> git rm -rf .
[10:03:47 CDT(-0500)] <EricDalquist> and copy in the new files
[10:03:59 CDT(-0500)] <athena> cool
[10:04:00 CDT(-0500)] <EricDalquist> you won't get the big delete commit then
[10:04:04 CDT(-0500)] <athena> oh, nice
[10:04:07 CDT(-0500)] <EricDalquist> it is just a branch with a different root parent
[10:04:16 CDT(-0500)] <EricDalquist> since git repos can have multiple "first commits"
[10:04:17 CDT(-0500)] <athena> nice
[10:04:21 CDT(-0500)] <EricDalquist> yay for directed graphs!
[10:04:22 CDT(-0500)] <athena> that sounds perfect
[10:04:22 CDT(-0500)] <EricDalquist>
[10:04:47 CDT(-0500)] <athena> so i've got working XSLT and JSON portlets in addition to the web proxy
[10:05:11 CDT(-0500)] <athena> those aren't very sophisticated - no parameters, no header replay, no authentication
[10:05:14 CDT(-0500)] <EricDalquist> oh nice
[10:05:18 CDT(-0500)] <athena> and the web proxy still needs a whole lot of work
[10:05:21 CDT(-0500)] <EricDalquist> using jsoup?
[10:05:24 CDT(-0500)] <EricDalquist> right
[10:05:24 CDT(-0500)] <athena> yep
[10:05:33 CDT(-0500)] <EricDalquist> awesome!
[10:05:45 CDT(-0500)] <athena> but hopefully that'll be a good starting point for us to collaborate
[10:05:52 CDT(-0500)] <EricDalquist> yeah
[10:07:00 CDT(-0500)] <athena> the XSLT and JSON pieces are probably usable for trivial cases now
[10:07:04 CDT(-0500)] <athena> web proxy is definitely not usable yet
[10:07:04 CDT(-0500)] <EricDalquist> cool
[10:07:07 CDT(-0500)] <EricDalquist> yeah
[10:07:23 CDT(-0500)] <athena> think that'll take some work before we've got all the critical pieces together
[10:07:33 CDT(-0500)] <athena> but there's clipping and some half-done URL rewriting
[10:07:41 CDT(-0500)] <EricDalquist> so cool
[10:08:00 CDT(-0500)] <athena> oh, also made sure all three support pulling content from either a URL or a classpath location
[10:08:11 CDT(-0500)] <EricDalquist> great
[10:08:26 CDT(-0500)] <EricDalquist> I'm assuming jsoup lets us use httpclient under the hood
[10:08:26 CDT(-0500)] <athena> i know that's one thing CWebProxy had but the portlet didn't
[10:08:30 CDT(-0500)] <athena> yep
[10:08:32 CDT(-0500)] <EricDalquist> yeah
[10:08:37 CDT(-0500)] <EricDalquist> I kinda have a love/hate with that feature
[10:08:43 CDT(-0500)] <athena> and i split that out entirely - have jsoup using the call that just takes an inpu stream
[10:08:46 CDT(-0500)] <athena> yeah, agreed
[10:08:47 CDT(-0500)] <EricDalquist> we need a way to turn that off at the portlet.xml or deploy time level
[10:09:08 CDT(-0500)] <athena> fair enough
[10:09:27 CDT(-0500)] <EricDalquist> like otherwise we couldn't use it on the live build site (whenever I get that working again)
[10:09:29 CDT(-0500)] <athena> at least this version is just classpath and not a file path
[10:09:38 CDT(-0500)] <EricDalquist> ah true
[10:09:43 CDT(-0500)] <EricDalquist> so that is much better
[10:09:47 CDT(-0500)] <athena> still don't want to have it available in all installs, but seems like that limits things somewhat
[10:09:50 CDT(-0500)] <EricDalquist> yup
[10:10:03 CDT(-0500)] <athena> i just don't feel comfortable having something that can read the entire filesystem, even if it's admin-only
[10:10:07 CDT(-0500)] <athena> too much potential for oopses
[10:10:11 CDT(-0500)] <EricDalquist> yup
[10:10:16 CDT(-0500)] <EricDalquist> steal all the config on the machine
[10:10:19 CDT(-0500)] <athena> yes
[10:10:24 CDT(-0500)] <athena> ooh db passwords!
[10:10:47 CDT(-0500)] <athena> master passwords to banner and exchange!
[10:10:50 CDT(-0500)] <EricDalquist> yup
[10:10:51 CDT(-0500)] <athena> bad.
[10:10:56 CDT(-0500)] <EricDalquist> well
[10:11:08 CDT(-0500)] <EricDalquist> it would be just the proxy portlet's classpaTH
[10:11:10 CDT(-0500)] <EricDalquist> and shared/lib
[10:11:13 CDT(-0500)] <EricDalquist> and tomcat's classpath
[10:11:15 CDT(-0500)] <EricDalquist> still
[10:11:18 CDT(-0500)] <EricDalquist> not good
[10:13:10 CDT(-0500)] <athena> i mean if it could read the whole file system
[10:13:18 CDT(-0500)] <EricDalquist> right
[10:13:21 CDT(-0500)] <EricDalquist> but even so
[10:13:32 CDT(-0500)] <EricDalquist> in the classpath it can read the web proxy portlet's db config
[10:13:39 CDT(-0500)] <athena> yeah
[10:13:50 CDT(-0500)] <EricDalquist> well
[10:13:51 CDT(-0500)] <athena> true
[10:13:56 CDT(-0500)] <EricDalquist> we could put that in WEB-INF
[10:14:01 CDT(-0500)] <EricDalquist> instead of resources
[10:14:06 CDT(-0500)] <athena> good plan
[10:14:11 CDT(-0500)] <athena> at least there isn't as much interesting stuff in the portal db as there is other places
[10:14:26 CDT(-0500)] <EricDalquist> yeah
[10:14:26 CDT(-0500)] <athena> one advantage of uportal not copying in stuff locally
[10:24:55 CDT(-0500)] <athena> https://github.com/Jasig/WebproxyPortlet/tree/v2
[10:24:58 CDT(-0500)] <athena> https://github.com/Jasig/WebproxyPortlet/tree/v2
[10:25:02 CDT(-0500)] <athena> oops.
[10:25:51 CDT(-0500)] <EricDalquist> yay!
[10:29:13 CDT(-0500)] <EricDalquist> this is an actual method api in the oracle jdbc driver:
[10:29:14 CDT(-0500)] <EricDalquist> doOALL(boolean, boolean, boolean, boolean, boolean, byte, int, byte[], int, Accessor[], int, Accessor[], int, byte[], char[], short[], int, DBConversion, byte[], InputStream[][], byte[][][], OracleTypeADT[][], OracleStatement, byte[], char[], short[], T4CTTIoac[], int[], int[], int[], NTFDCNRegistration)
[10:29:20 CDT(-0500)] <athena> one of the current problems is that the filter interface i wrote can't figure out what the requested URL was (https://github.com/Jasig/WebproxyPortlet/blob/v2/src/main/java/org/jasig/portlet/proxy/service/web/URLRewritingFilter.java)
[10:29:28 CDT(-0500)] <athena> so a base url is hard-coded at the moment
[10:29:30 CDT(-0500)] <athena> need to fix that
[10:29:38 CDT(-0500)] <athena> aaaaaaaaah my eyes, they burn! wow.
[10:29:42 CDT(-0500)] <EricDalquist> ah
[10:29:43 CDT(-0500)] <EricDalquist> right
[10:29:52 CDT(-0500)] <EricDalquist> so you need to pass around the final url for the page
[10:30:06 CDT(-0500)] <athena> yeah
[10:30:06 CDT(-0500)] <EricDalquist> which when you start dealing with redirects isn't just the url httpclient requests
[10:30:19 CDT(-0500)] <athena> that's a good point
[10:30:37 CDT(-0500)] <athena> so do we want to just add the URL to the interface's method?
[10:30:51 CDT(-0500)] <EricDalquist> well
[10:30:53 CDT(-0500)] <athena> or do we need broader access to something else (like the http response entity)
[10:30:56 CDT(-0500)] <EricDalquist> might want a ProxyRequest object
[10:31:04 CDT(-0500)] <EricDalquist> that you can add stuff to
[10:31:08 CDT(-0500)] <athena> yeah
[10:31:14 CDT(-0500)] <EricDalquist> since I'm guessing url isn't the last thing you'll find you need
[10:31:16 CDT(-0500)] <athena> yeah
[10:31:19 CDT(-0500)] <athena> that was my thought as well
[10:31:28 CDT(-0500)] <athena> was wondering if you already had other things in mind
[10:31:35 CDT(-0500)] <EricDalquist> not really
[10:31:38 CDT(-0500)] <athena> though having a ProxyRequest object at least gives us one place to start adding stuff
[10:31:39 CDT(-0500)] <athena> fair enough
[10:31:59 CDT(-0500)] <athena> maybe we could even subclass that into HttpProxyRequest and ClasspathProxyRequest
[10:32:11 CDT(-0500)] <EricDalquist> yeah
[10:32:22 CDT(-0500)] <athena> that way we could easily know that a given request just doesn't have any of that base url nonsense
[10:32:40 CDT(-0500)] <EricDalquist> yup
[10:33:14 CDT(-0500)] <athena> sounds good
[10:33:25 CDT(-0500)] <athena> i also need to subclass the content retrieval service, i think
[10:33:35 CDT(-0500)] <athena> or extend the interface, rather
[10:33:54 CDT(-0500)] <athena> since the http version probably needs to be able to return something beyond just an input stream
[10:33:57 CDT(-0500)] <athena> headers, etc.
[10:34:06 CDT(-0500)] <EricDalquist> yup
[10:34:12 CDT(-0500)] <EricDalquist> and we need to be able to set headers
[10:34:26 CDT(-0500)] <EricDalquist> also need some way to coordinate a HttpState object with the current user
[10:34:34 CDT(-0500)] <athena> yes
[10:34:41 CDT(-0500)] <athena> and that's certainly not there yet
[10:34:51 CDT(-0500)] <athena> also whatever magic is needed to make forms work
[10:35:05 CDT(-0500)] <EricDalquist>
[10:35:17 CDT(-0500)] <athena> do we currently just replay parameters or something?
[10:35:49 CDT(-0500)] <EricDalquist> oh like a proxied form?
[10:35:52 CDT(-0500)] <athena> yeah
[10:36:18 CDT(-0500)] <EricDalquist> well it isn't that much different than normal request proxies
[10:36:28 CDT(-0500)] <EricDalquist> one thing is that the rewrite filter needs to change all forms to POST
[10:36:38 CDT(-0500)] <athena> yeah
[10:36:40 CDT(-0500)] <athena> got that part
[10:36:47 CDT(-0500)] <EricDalquist> then you rewrite the form action url to something so that you know it is a form
[10:37:04 CDT(-0500)] <EricDalquist> and also all proxy portlet parameters need a prefix of some sort
[10:37:13 CDT(-0500)] <EricDalquist> then all non-prefixed parameters get passed through
[10:39:46 CDT(-0500)] <athena> makes sense
[10:40:08 CDT(-0500)] <EricDalquist> you need to encode what type of form was originally used though
[10:40:14 CDT(-0500)] <EricDalquist> so if you rewrite a get form to post
[10:40:32 CDT(-0500)] <EricDalquist> you still need to do a get in the portlet
[10:40:54 CDT(-0500)] <EricDalquist> and you need to make sure that for POSTd forms your handling url vs multipart form params correctly
[10:41:00 CDT(-0500)] <EricDalquist> 90% of webapps don't really care
[10:41:01 CDT(-0500)] <EricDalquist> but some do
[10:42:29 CDT(-0500)] <athena> ok, that makes sense
[10:42:41 CDT(-0500)] <athena> i wasn't quite sure what all the logic in the current portlet was doing - thanks!
[10:42:46 CDT(-0500)] <EricDalquist> yeah
[10:42:54 CDT(-0500)] <EricDalquist> it really isn't very clear
[10:43:02 CDT(-0500)] <EricDalquist> and I'm sure we'll miss parts as we go
[10:43:08 CDT(-0500)] <EricDalquist> but hopefully the result will be easier to grok
[10:43:25 CDT(-0500)] <athena> yeah
[10:43:31 CDT(-0500)] <athena> there's not a lot of code right now
[11:06:59 CDT(-0500)] <athena> does spring or commons have a convenient URL parsing method by now?
[11:07:40 CDT(-0500)] <EricDalquist> not that I know of
[11:07:48 CDT(-0500)] <EricDalquist> would be worth a look though
[11:07:56 CDT(-0500)] <EricDalquist> might be something in httpclienty you can use
[11:09:08 CDT(-0500)] <athena> yeah
[11:09:19 CDT(-0500)] <athena> just seems stupid to construct base urls manually from a URL
[11:16:04 CDT(-0500)] <athena> ooh i think this works
[11:16:05 CDT(-0500)] <athena> http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/client/utils/URIBuilder.html
[11:16:22 CDT(-0500)] <athena> built from the original string url, then removed the query and set the path to a blank string
[11:16:27 CDT(-0500)] <EricDalquist> nice
[11:17:45 CDT(-0500)] <EricDalquist> oo! new laptop shipped!
[11:22:50 CDT(-0500)] <athena> ooooo
[11:22:51 CDT(-0500)] <athena> yay!
[11:49:05 CDT(-0500)] <athena> EricDalquist: want to talk about the courses portlet at all?
[11:49:17 CDT(-0500)] <EricDalquist> yes but not sure I'll have time today
[11:49:23 CDT(-0500)] <EricDalquist> I'll check back in around 2
[11:49:27 CDT(-0500)] <athena> sure thing
[11:49:30 CDT(-0500)] <athena> i keep getting sidetracked too