| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242 |
- [
- "# Pulled from https://github.com/web-platform-tests/wpt/blob/876fe001f2279b96e7c6b9e8970dc92c484835ff/url/resources/urltestdata.json",
- {
- "input": "http://example\t.\norg",
- "base": "http://example.org/foo/bar",
- "href": "http://example.org/",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://user:pass@foo:21/bar;par?b#c",
- "base": "http://example.org/foo/bar",
- "href": "http://user:pass@foo:21/bar;par?b#c",
- "origin": "http://foo:21",
- "protocol": "http:",
- "username": "user",
- "password": "pass",
- "host": "foo:21",
- "hostname": "foo",
- "port": "21",
- "pathname": "/bar;par",
- "search": "?b",
- "hash": "#c"
- },
- {
- "input": "https://test:@test",
- "base": null,
- "href": "https://test@test/",
- "origin": "https://test",
- "protocol": "https:",
- "username": "test",
- "password": "",
- "host": "test",
- "hostname": "test",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "https://:@test",
- "base": null,
- "href": "https://test/",
- "origin": "https://test",
- "protocol": "https:",
- "username": "",
- "password": "",
- "host": "test",
- "hostname": "test",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "non-special://test:@test/x",
- "base": null,
- "href": "non-special://test@test/x",
- "origin": "null",
- "protocol": "non-special:",
- "username": "test",
- "password": "",
- "host": "test",
- "hostname": "test",
- "port": "",
- "pathname": "/x",
- "search": "",
- "hash": ""
- },
- {
- "input": "non-special://:@test/x",
- "base": null,
- "href": "non-special://test/x",
- "origin": "null",
- "protocol": "non-special:",
- "username": "",
- "password": "",
- "host": "test",
- "hostname": "test",
- "port": "",
- "pathname": "/x",
- "search": "",
- "hash": ""
- },
- {
- "input": "http:foo.com",
- "base": "http://example.org/foo/bar",
- "href": "http://example.org/foo/foo.com",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/foo/foo.com",
- "search": "",
- "hash": ""
- },
- {
- "input": "\t :foo.com \n",
- "base": "http://example.org/foo/bar",
- "href": "http://example.org/foo/:foo.com",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/foo/:foo.com",
- "search": "",
- "hash": ""
- },
- {
- "input": " foo.com ",
- "base": "http://example.org/foo/bar",
- "href": "http://example.org/foo/foo.com",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/foo/foo.com",
- "search": "",
- "hash": ""
- },
- {
- "input": "a:\t foo.com",
- "base": "http://example.org/foo/bar",
- "href": "a: foo.com",
- "origin": "null",
- "protocol": "a:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": " foo.com",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://f:21/ b ? d # e ",
- "base": "http://example.org/foo/bar",
- "href": "http://f:21/%20b%20?%20d%20#%20e",
- "origin": "http://f:21",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "f:21",
- "hostname": "f",
- "port": "21",
- "pathname": "/%20b%20",
- "search": "?%20d%20",
- "hash": "#%20e"
- },
- {
- "input": "lolscheme:x x#x x",
- "base": null,
- "href": "lolscheme:x x#x%20x",
- "protocol": "lolscheme:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "x x",
- "search": "",
- "hash": "#x%20x"
- },
- {
- "input": "http://f:/c",
- "base": "http://example.org/foo/bar",
- "href": "http://f/c",
- "origin": "http://f",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "f",
- "hostname": "f",
- "port": "",
- "pathname": "/c",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://f:0/c",
- "base": "http://example.org/foo/bar",
- "href": "http://f:0/c",
- "origin": "http://f:0",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "f:0",
- "hostname": "f",
- "port": "0",
- "pathname": "/c",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://f:00000000000000/c",
- "base": "http://example.org/foo/bar",
- "href": "http://f:0/c",
- "origin": "http://f:0",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "f:0",
- "hostname": "f",
- "port": "0",
- "pathname": "/c",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://f:00000000000000000000080/c",
- "base": "http://example.org/foo/bar",
- "href": "http://f/c",
- "origin": "http://f",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "f",
- "hostname": "f",
- "port": "",
- "pathname": "/c",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://f:b/c",
- "base": "http://example.org/foo/bar",
- "failure": true
- },
- {
- "input": "http://f: /c",
- "base": "http://example.org/foo/bar",
- "failure": true
- },
- {
- "input": "http://f:\n/c",
- "base": "http://example.org/foo/bar",
- "href": "http://f/c",
- "origin": "http://f",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "f",
- "hostname": "f",
- "port": "",
- "pathname": "/c",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://f:fifty-two/c",
- "base": "http://example.org/foo/bar",
- "failure": true
- },
- {
- "input": "http://f:999999/c",
- "base": "http://example.org/foo/bar",
- "failure": true
- },
- {
- "input": "non-special://f:999999/c",
- "base": "http://example.org/foo/bar",
- "failure": true
- },
- {
- "input": "http://f: 21 / b ? d # e ",
- "base": "http://example.org/foo/bar",
- "failure": true
- },
- {
- "input": "",
- "base": "http://example.org/foo/bar",
- "href": "http://example.org/foo/bar",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/foo/bar",
- "search": "",
- "hash": ""
- },
- {
- "input": " \t",
- "base": "http://example.org/foo/bar",
- "href": "http://example.org/foo/bar",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/foo/bar",
- "search": "",
- "hash": ""
- },
- {
- "input": ":foo.com/",
- "base": "http://example.org/foo/bar",
- "href": "http://example.org/foo/:foo.com/",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/foo/:foo.com/",
- "search": "",
- "hash": ""
- },
- {
- "input": ":foo.com\\",
- "base": "http://example.org/foo/bar",
- "href": "http://example.org/foo/:foo.com/",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/foo/:foo.com/",
- "search": "",
- "hash": ""
- },
- {
- "input": ":",
- "base": "http://example.org/foo/bar",
- "href": "http://example.org/foo/:",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/foo/:",
- "search": "",
- "hash": ""
- },
- {
- "input": ":a",
- "base": "http://example.org/foo/bar",
- "href": "http://example.org/foo/:a",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/foo/:a",
- "search": "",
- "hash": ""
- },
- {
- "input": ":/",
- "base": "http://example.org/foo/bar",
- "href": "http://example.org/foo/:/",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/foo/:/",
- "search": "",
- "hash": ""
- },
- {
- "input": ":\\",
- "base": "http://example.org/foo/bar",
- "href": "http://example.org/foo/:/",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/foo/:/",
- "search": "",
- "hash": ""
- },
- {
- "input": ":#",
- "base": "http://example.org/foo/bar",
- "href": "http://example.org/foo/:#",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/foo/:",
- "search": "",
- "hash": ""
- },
- {
- "input": "#",
- "base": "http://example.org/foo/bar",
- "href": "http://example.org/foo/bar#",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/foo/bar",
- "search": "",
- "hash": ""
- },
- {
- "input": "#/",
- "base": "http://example.org/foo/bar",
- "href": "http://example.org/foo/bar#/",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/foo/bar",
- "search": "",
- "hash": "#/"
- },
- {
- "input": "#\\",
- "base": "http://example.org/foo/bar",
- "href": "http://example.org/foo/bar#\\",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/foo/bar",
- "search": "",
- "hash": "#\\"
- },
- {
- "input": "#;?",
- "base": "http://example.org/foo/bar",
- "href": "http://example.org/foo/bar#;?",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/foo/bar",
- "search": "",
- "hash": "#;?"
- },
- {
- "input": "?",
- "base": "http://example.org/foo/bar",
- "href": "http://example.org/foo/bar?",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/foo/bar",
- "search": "",
- "hash": ""
- },
- {
- "input": "/",
- "base": "http://example.org/foo/bar",
- "href": "http://example.org/",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": ":23",
- "base": "http://example.org/foo/bar",
- "href": "http://example.org/foo/:23",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/foo/:23",
- "search": "",
- "hash": ""
- },
- {
- "input": "/:23",
- "base": "http://example.org/foo/bar",
- "href": "http://example.org/:23",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/:23",
- "search": "",
- "hash": ""
- },
- {
- "input": "\\x",
- "base": "http://example.org/foo/bar",
- "href": "http://example.org/x",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/x",
- "search": "",
- "hash": ""
- },
- {
- "input": "\\\\x\\hello",
- "base": "http://example.org/foo/bar",
- "href": "http://x/hello",
- "origin": "http://x",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "x",
- "hostname": "x",
- "port": "",
- "pathname": "/hello",
- "search": "",
- "hash": ""
- },
- {
- "input": "::",
- "base": "http://example.org/foo/bar",
- "href": "http://example.org/foo/::",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/foo/::",
- "search": "",
- "hash": ""
- },
- {
- "input": "::23",
- "base": "http://example.org/foo/bar",
- "href": "http://example.org/foo/::23",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/foo/::23",
- "search": "",
- "hash": ""
- },
- {
- "input": "foo://",
- "base": "http://example.org/foo/bar",
- "href": "foo://",
- "origin": "null",
- "protocol": "foo:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://a:b@c:29/d",
- "base": "http://example.org/foo/bar",
- "href": "http://a:b@c:29/d",
- "origin": "http://c:29",
- "protocol": "http:",
- "username": "a",
- "password": "b",
- "host": "c:29",
- "hostname": "c",
- "port": "29",
- "pathname": "/d",
- "search": "",
- "hash": ""
- },
- {
- "input": "http::@c:29",
- "base": "http://example.org/foo/bar",
- "href": "http://example.org/foo/:@c:29",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/foo/:@c:29",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://&a:foo(b]c@d:2/",
- "base": "http://example.org/foo/bar",
- "href": "http://&a:foo(b%5Dc@d:2/",
- "origin": "http://d:2",
- "protocol": "http:",
- "username": "&a",
- "password": "foo(b%5Dc",
- "host": "d:2",
- "hostname": "d",
- "port": "2",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://::@c@d:2",
- "base": "http://example.org/foo/bar",
- "href": "http://:%3A%40c@d:2/",
- "origin": "http://d:2",
- "protocol": "http:",
- "username": "",
- "password": "%3A%40c",
- "host": "d:2",
- "hostname": "d",
- "port": "2",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://foo.com:b@d/",
- "base": "http://example.org/foo/bar",
- "href": "http://foo.com:b@d/",
- "origin": "http://d",
- "protocol": "http:",
- "username": "foo.com",
- "password": "b",
- "host": "d",
- "hostname": "d",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://foo.com/\\@",
- "base": "http://example.org/foo/bar",
- "href": "http://foo.com//@",
- "origin": "http://foo.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "foo.com",
- "hostname": "foo.com",
- "port": "",
- "pathname": "//@",
- "search": "",
- "hash": ""
- },
- {
- "input": "http:\\\\foo.com\\",
- "base": "http://example.org/foo/bar",
- "href": "http://foo.com/",
- "origin": "http://foo.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "foo.com",
- "hostname": "foo.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http:\\\\a\\b:c\\d@foo.com\\",
- "base": "http://example.org/foo/bar",
- "href": "http://a/b:c/d@foo.com/",
- "origin": "http://a",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "a",
- "hostname": "a",
- "port": "",
- "pathname": "/b:c/d@foo.com/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://a:b@c\\",
- "base": null,
- "href": "http://a:b@c/",
- "origin": "http://c",
- "protocol": "http:",
- "username": "a",
- "password": "b",
- "host": "c",
- "hostname": "c",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "ws://a@b\\c",
- "base": null,
- "href": "ws://a@b/c",
- "origin": "ws://b",
- "protocol": "ws:",
- "username": "a",
- "password": "",
- "host": "b",
- "hostname": "b",
- "port": "",
- "pathname": "/c",
- "search": "",
- "hash": ""
- },
- {
- "input": "foo:/",
- "base": "http://example.org/foo/bar",
- "href": "foo:/",
- "origin": "null",
- "protocol": "foo:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "foo:/bar.com/",
- "base": "http://example.org/foo/bar",
- "href": "foo:/bar.com/",
- "origin": "null",
- "protocol": "foo:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/bar.com/",
- "search": "",
- "hash": ""
- },
- {
- "input": "foo://///////",
- "base": "http://example.org/foo/bar",
- "href": "foo://///////",
- "origin": "null",
- "protocol": "foo:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "///////",
- "search": "",
- "hash": ""
- },
- {
- "input": "foo://///////bar.com/",
- "base": "http://example.org/foo/bar",
- "href": "foo://///////bar.com/",
- "origin": "null",
- "protocol": "foo:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "///////bar.com/",
- "search": "",
- "hash": ""
- },
- {
- "input": "foo:////://///",
- "base": "http://example.org/foo/bar",
- "href": "foo:////://///",
- "origin": "null",
- "protocol": "foo:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "//://///",
- "search": "",
- "hash": ""
- },
- {
- "input": "c:/foo",
- "base": "http://example.org/foo/bar",
- "href": "c:/foo",
- "origin": "null",
- "protocol": "c:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/foo",
- "search": "",
- "hash": ""
- },
- {
- "input": "//foo/bar",
- "base": "http://example.org/foo/bar",
- "href": "http://foo/bar",
- "origin": "http://foo",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "foo",
- "hostname": "foo",
- "port": "",
- "pathname": "/bar",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://foo/path;a??e#f#g",
- "base": "http://example.org/foo/bar",
- "href": "http://foo/path;a??e#f#g",
- "origin": "http://foo",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "foo",
- "hostname": "foo",
- "port": "",
- "pathname": "/path;a",
- "search": "??e",
- "hash": "#f#g"
- },
- {
- "input": "http://foo/abcd?efgh?ijkl",
- "base": "http://example.org/foo/bar",
- "href": "http://foo/abcd?efgh?ijkl",
- "origin": "http://foo",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "foo",
- "hostname": "foo",
- "port": "",
- "pathname": "/abcd",
- "search": "?efgh?ijkl",
- "hash": ""
- },
- {
- "input": "http://foo/abcd#foo?bar",
- "base": "http://example.org/foo/bar",
- "href": "http://foo/abcd#foo?bar",
- "origin": "http://foo",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "foo",
- "hostname": "foo",
- "port": "",
- "pathname": "/abcd",
- "search": "",
- "hash": "#foo?bar"
- },
- {
- "input": "[61:24:74]:98",
- "base": "http://example.org/foo/bar",
- "href": "http://example.org/foo/[61:24:74]:98",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/foo/[61:24:74]:98",
- "search": "",
- "hash": ""
- },
- {
- "input": "http:[61:27]/:foo",
- "base": "http://example.org/foo/bar",
- "href": "http://example.org/foo/[61:27]/:foo",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/foo/[61:27]/:foo",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://[1::2]:3:4",
- "base": "http://example.org/foo/bar",
- "failure": true
- },
- {
- "input": "http://2001::1",
- "base": "http://example.org/foo/bar",
- "failure": true
- },
- {
- "input": "http://2001::1]",
- "base": "http://example.org/foo/bar",
- "failure": true
- },
- {
- "input": "http://2001::1]:80",
- "base": "http://example.org/foo/bar",
- "failure": true
- },
- {
- "input": "http://[2001::1]",
- "base": "http://example.org/foo/bar",
- "href": "http://[2001::1]/",
- "origin": "http://[2001::1]",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "[2001::1]",
- "hostname": "[2001::1]",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://[::127.0.0.1]",
- "base": "http://example.org/foo/bar",
- "href": "http://[::7f00:1]/",
- "origin": "http://[::7f00:1]",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "[::7f00:1]",
- "hostname": "[::7f00:1]",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://[::127.0.0.1.]",
- "base": "http://example.org/foo/bar",
- "failure": true
- },
- {
- "input": "http://[0:0:0:0:0:0:13.1.68.3]",
- "base": "http://example.org/foo/bar",
- "href": "http://[::d01:4403]/",
- "origin": "http://[::d01:4403]",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "[::d01:4403]",
- "hostname": "[::d01:4403]",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://[2001::1]:80",
- "base": "http://example.org/foo/bar",
- "href": "http://[2001::1]/",
- "origin": "http://[2001::1]",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "[2001::1]",
- "hostname": "[2001::1]",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http:/example.com/",
- "base": "http://example.org/foo/bar",
- "href": "http://example.org/example.com/",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/example.com/",
- "search": "",
- "hash": ""
- },
- {
- "input": "ftp:/example.com/",
- "base": "http://example.org/foo/bar",
- "href": "ftp://example.com/",
- "origin": "ftp://example.com",
- "protocol": "ftp:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "https:/example.com/",
- "base": "http://example.org/foo/bar",
- "href": "https://example.com/",
- "origin": "https://example.com",
- "protocol": "https:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "madeupscheme:/example.com/",
- "base": "http://example.org/foo/bar",
- "href": "madeupscheme:/example.com/",
- "origin": "null",
- "protocol": "madeupscheme:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/example.com/",
- "search": "",
- "hash": ""
- },
- {
- "input": "file:/example.com/",
- "base": "http://example.org/foo/bar",
- "href": "file:///example.com/",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/example.com/",
- "search": "",
- "hash": ""
- },
- {
- "input": "file://example:1/",
- "base": null,
- "failure": true
- },
- {
- "input": "file://example:test/",
- "base": null,
- "failure": true
- },
- {
- "input": "file://example%/",
- "base": null,
- "failure": true
- },
- {
- "input": "file://[example]/",
- "base": null,
- "failure": true
- },
- {
- "input": "ftps:/example.com/",
- "base": "http://example.org/foo/bar",
- "href": "ftps:/example.com/",
- "origin": "null",
- "protocol": "ftps:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/example.com/",
- "search": "",
- "hash": ""
- },
- {
- "input": "gopher:/example.com/",
- "base": "http://example.org/foo/bar",
- "href": "gopher:/example.com/",
- "origin": "null",
- "protocol": "gopher:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/example.com/",
- "search": "",
- "hash": ""
- },
- {
- "input": "ws:/example.com/",
- "base": "http://example.org/foo/bar",
- "href": "ws://example.com/",
- "origin": "ws://example.com",
- "protocol": "ws:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "wss:/example.com/",
- "base": "http://example.org/foo/bar",
- "href": "wss://example.com/",
- "origin": "wss://example.com",
- "protocol": "wss:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "data:/example.com/",
- "base": "http://example.org/foo/bar",
- "href": "data:/example.com/",
- "origin": "null",
- "protocol": "data:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/example.com/",
- "search": "",
- "hash": ""
- },
- {
- "input": "javascript:/example.com/",
- "base": "http://example.org/foo/bar",
- "href": "javascript:/example.com/",
- "origin": "null",
- "protocol": "javascript:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/example.com/",
- "search": "",
- "hash": ""
- },
- {
- "input": "mailto:/example.com/",
- "base": "http://example.org/foo/bar",
- "href": "mailto:/example.com/",
- "origin": "null",
- "protocol": "mailto:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/example.com/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http:example.com/",
- "base": "http://example.org/foo/bar",
- "href": "http://example.org/foo/example.com/",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/foo/example.com/",
- "search": "",
- "hash": ""
- },
- {
- "input": "ftp:example.com/",
- "base": "http://example.org/foo/bar",
- "href": "ftp://example.com/",
- "origin": "ftp://example.com",
- "protocol": "ftp:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "https:example.com/",
- "base": "http://example.org/foo/bar",
- "href": "https://example.com/",
- "origin": "https://example.com",
- "protocol": "https:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "madeupscheme:example.com/",
- "base": "http://example.org/foo/bar",
- "href": "madeupscheme:example.com/",
- "origin": "null",
- "protocol": "madeupscheme:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "example.com/",
- "search": "",
- "hash": ""
- },
- {
- "input": "ftps:example.com/",
- "base": "http://example.org/foo/bar",
- "href": "ftps:example.com/",
- "origin": "null",
- "protocol": "ftps:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "example.com/",
- "search": "",
- "hash": ""
- },
- {
- "input": "gopher:example.com/",
- "base": "http://example.org/foo/bar",
- "href": "gopher:example.com/",
- "origin": "null",
- "protocol": "gopher:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "example.com/",
- "search": "",
- "hash": ""
- },
- {
- "input": "ws:example.com/",
- "base": "http://example.org/foo/bar",
- "href": "ws://example.com/",
- "origin": "ws://example.com",
- "protocol": "ws:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "wss:example.com/",
- "base": "http://example.org/foo/bar",
- "href": "wss://example.com/",
- "origin": "wss://example.com",
- "protocol": "wss:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "data:example.com/",
- "base": "http://example.org/foo/bar",
- "href": "data:example.com/",
- "origin": "null",
- "protocol": "data:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "example.com/",
- "search": "",
- "hash": ""
- },
- {
- "input": "javascript:example.com/",
- "base": "http://example.org/foo/bar",
- "href": "javascript:example.com/",
- "origin": "null",
- "protocol": "javascript:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "example.com/",
- "search": "",
- "hash": ""
- },
- {
- "input": "mailto:example.com/",
- "base": "http://example.org/foo/bar",
- "href": "mailto:example.com/",
- "origin": "null",
- "protocol": "mailto:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "example.com/",
- "search": "",
- "hash": ""
- },
- {
- "input": "/a/b/c",
- "base": "http://example.org/foo/bar",
- "href": "http://example.org/a/b/c",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/a/b/c",
- "search": "",
- "hash": ""
- },
- {
- "input": "/a/ /c",
- "base": "http://example.org/foo/bar",
- "href": "http://example.org/a/%20/c",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/a/%20/c",
- "search": "",
- "hash": ""
- },
- {
- "input": "/a%2fc",
- "base": "http://example.org/foo/bar",
- "href": "http://example.org/a%2fc",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/a%2fc",
- "search": "",
- "hash": ""
- },
- {
- "input": "/a/%2f/c",
- "base": "http://example.org/foo/bar",
- "href": "http://example.org/a/%2f/c",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/a/%2f/c",
- "search": "",
- "hash": ""
- },
- {
- "input": "#β",
- "base": "http://example.org/foo/bar",
- "href": "http://example.org/foo/bar#%CE%B2",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/foo/bar",
- "search": "",
- "hash": "#%CE%B2"
- },
- {
- "input": "data:text/html,test#test",
- "base": "http://example.org/foo/bar",
- "href": "data:text/html,test#test",
- "origin": "null",
- "protocol": "data:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "text/html,test",
- "search": "",
- "hash": "#test"
- },
- {
- "input": "tel:1234567890",
- "base": "http://example.org/foo/bar",
- "href": "tel:1234567890",
- "origin": "null",
- "protocol": "tel:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "1234567890",
- "search": "",
- "hash": ""
- },
- "# Based on https://felixfbecker.github.io/whatwg-url-custom-host-repro/",
- {
- "input": "ssh://example.com/foo/bar.git",
- "base": "http://example.org/",
- "href": "ssh://example.com/foo/bar.git",
- "origin": "null",
- "protocol": "ssh:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/foo/bar.git",
- "search": "",
- "hash": ""
- },
- "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/file.html",
- {
- "input": "file:c:\\foo\\bar.html",
- "base": "file:///tmp/mock/path",
- "href": "file:///c:/foo/bar.html",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/c:/foo/bar.html",
- "search": "",
- "hash": ""
- },
- {
- "input": " File:c|////foo\\bar.html",
- "base": "file:///tmp/mock/path",
- "href": "file:///c:////foo/bar.html",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/c:////foo/bar.html",
- "search": "",
- "hash": ""
- },
- {
- "input": "C|/foo/bar",
- "base": "file:///tmp/mock/path",
- "href": "file:///C:/foo/bar",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/C:/foo/bar",
- "search": "",
- "hash": ""
- },
- {
- "input": "/C|\\foo\\bar",
- "base": "file:///tmp/mock/path",
- "href": "file:///C:/foo/bar",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/C:/foo/bar",
- "search": "",
- "hash": ""
- },
- {
- "input": "//C|/foo/bar",
- "base": "file:///tmp/mock/path",
- "href": "file:///C:/foo/bar",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/C:/foo/bar",
- "search": "",
- "hash": ""
- },
- {
- "input": "//server/file",
- "base": "file:///tmp/mock/path",
- "href": "file://server/file",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "server",
- "hostname": "server",
- "port": "",
- "pathname": "/file",
- "search": "",
- "hash": ""
- },
- {
- "input": "\\\\server\\file",
- "base": "file:///tmp/mock/path",
- "href": "file://server/file",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "server",
- "hostname": "server",
- "port": "",
- "pathname": "/file",
- "search": "",
- "hash": ""
- },
- {
- "input": "/\\server/file",
- "base": "file:///tmp/mock/path",
- "href": "file://server/file",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "server",
- "hostname": "server",
- "port": "",
- "pathname": "/file",
- "search": "",
- "hash": ""
- },
- {
- "input": "file:///foo/bar.txt",
- "base": "file:///tmp/mock/path",
- "href": "file:///foo/bar.txt",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/foo/bar.txt",
- "search": "",
- "hash": ""
- },
- {
- "input": "file:///home/me",
- "base": "file:///tmp/mock/path",
- "href": "file:///home/me",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/home/me",
- "search": "",
- "hash": ""
- },
- {
- "input": "//",
- "base": "file:///tmp/mock/path",
- "href": "file:///",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "///",
- "base": "file:///tmp/mock/path",
- "href": "file:///",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "///test",
- "base": "file:///tmp/mock/path",
- "href": "file:///test",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/test",
- "search": "",
- "hash": ""
- },
- {
- "input": "file://test",
- "base": "file:///tmp/mock/path",
- "href": "file://test/",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "test",
- "hostname": "test",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "file://localhost",
- "base": "file:///tmp/mock/path",
- "href": "file:///",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "file://localhost/",
- "base": "file:///tmp/mock/path",
- "href": "file:///",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "file://localhost/test",
- "base": "file:///tmp/mock/path",
- "href": "file:///test",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/test",
- "search": "",
- "hash": ""
- },
- {
- "input": "test",
- "base": "file:///tmp/mock/path",
- "href": "file:///tmp/mock/test",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/tmp/mock/test",
- "search": "",
- "hash": ""
- },
- {
- "input": "file:test",
- "base": "file:///tmp/mock/path",
- "href": "file:///tmp/mock/test",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/tmp/mock/test",
- "search": "",
- "hash": ""
- },
- {
- "input": "file:///w|m",
- "base": null,
- "href": "file:///w|m",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/w|m",
- "search": "",
- "hash": ""
- },
- {
- "input": "file:///w||m",
- "base": null,
- "href": "file:///w||m",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/w||m",
- "search": "",
- "hash": ""
- },
- {
- "input": "file:///w|/m",
- "base": null,
- "href": "file:///w:/m",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/w:/m",
- "search": "",
- "hash": ""
- },
- {
- "input": "file:C|/m/",
- "base": null,
- "href": "file:///C:/m/",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/C:/m/",
- "search": "",
- "hash": ""
- },
- {
- "input": "file:C||/m/",
- "base": null,
- "href": "file:///C||/m/",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/C||/m/",
- "search": "",
- "hash": ""
- },
- "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/path.js",
- {
- "input": "http://example.com/././foo",
- "base": null,
- "href": "http://example.com/foo",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/foo",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://example.com/./.foo",
- "base": null,
- "href": "http://example.com/.foo",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/.foo",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://example.com/foo/.",
- "base": null,
- "href": "http://example.com/foo/",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/foo/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://example.com/foo/./",
- "base": null,
- "href": "http://example.com/foo/",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/foo/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://example.com/foo/bar/..",
- "base": null,
- "href": "http://example.com/foo/",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/foo/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://example.com/foo/bar/../",
- "base": null,
- "href": "http://example.com/foo/",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/foo/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://example.com/foo/..bar",
- "base": null,
- "href": "http://example.com/foo/..bar",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/foo/..bar",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://example.com/foo/bar/../ton",
- "base": null,
- "href": "http://example.com/foo/ton",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/foo/ton",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://example.com/foo/bar/../ton/../../a",
- "base": null,
- "href": "http://example.com/a",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/a",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://example.com/foo/../../..",
- "base": null,
- "href": "http://example.com/",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://example.com/foo/../../../ton",
- "base": null,
- "href": "http://example.com/ton",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/ton",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://example.com/foo/%2e",
- "base": null,
- "href": "http://example.com/foo/",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/foo/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://example.com/foo/%2e%2",
- "base": null,
- "href": "http://example.com/foo/%2e%2",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/foo/%2e%2",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar",
- "base": null,
- "href": "http://example.com/%2e.bar",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/%2e.bar",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://example.com////../..",
- "base": null,
- "href": "http://example.com//",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "//",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://example.com/foo/bar//../..",
- "base": null,
- "href": "http://example.com/foo/",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/foo/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://example.com/foo/bar//..",
- "base": null,
- "href": "http://example.com/foo/bar/",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/foo/bar/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://example.com/foo",
- "base": null,
- "href": "http://example.com/foo",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/foo",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://example.com/%20foo",
- "base": null,
- "href": "http://example.com/%20foo",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/%20foo",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://example.com/foo%",
- "base": null,
- "href": "http://example.com/foo%",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/foo%",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://example.com/foo%2",
- "base": null,
- "href": "http://example.com/foo%2",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/foo%2",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://example.com/foo%2zbar",
- "base": null,
- "href": "http://example.com/foo%2zbar",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/foo%2zbar",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://example.com/foo%2©zbar",
- "base": null,
- "href": "http://example.com/foo%2%C3%82%C2%A9zbar",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/foo%2%C3%82%C2%A9zbar",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://example.com/foo%41%7a",
- "base": null,
- "href": "http://example.com/foo%41%7a",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/foo%41%7a",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://example.com/foo\t\u0091%91",
- "base": null,
- "href": "http://example.com/foo%C2%91%91",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/foo%C2%91%91",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://example.com/foo%00%51",
- "base": null,
- "href": "http://example.com/foo%00%51",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/foo%00%51",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://example.com/(%28:%3A%29)",
- "base": null,
- "href": "http://example.com/(%28:%3A%29)",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/(%28:%3A%29)",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://example.com/%3A%3a%3C%3c",
- "base": null,
- "href": "http://example.com/%3A%3a%3C%3c",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/%3A%3a%3C%3c",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://example.com/foo\tbar",
- "base": null,
- "href": "http://example.com/foobar",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/foobar",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://example.com\\\\foo\\\\bar",
- "base": null,
- "href": "http://example.com//foo//bar",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "//foo//bar",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd",
- "base": null,
- "href": "http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/%7Ffp3%3Eju%3Dduvgw%3Dd",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://example.com/@asdf%40",
- "base": null,
- "href": "http://example.com/@asdf%40",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/@asdf%40",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://example.com/你好你好",
- "base": null,
- "href": "http://example.com/%E4%BD%A0%E5%A5%BD%E4%BD%A0%E5%A5%BD",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/%E4%BD%A0%E5%A5%BD%E4%BD%A0%E5%A5%BD",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://example.com/‥/foo",
- "base": null,
- "href": "http://example.com/%E2%80%A5/foo",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/%E2%80%A5/foo",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://example.com//foo",
- "base": null,
- "href": "http://example.com/%EF%BB%BF/foo",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/%EF%BB%BF/foo",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://example.com//foo//bar",
- "base": null,
- "href": "http://example.com/%E2%80%AE/foo/%E2%80%AD/bar",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/%E2%80%AE/foo/%E2%80%AD/bar",
- "search": "",
- "hash": ""
- },
- "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/relative.js",
- {
- "input": "http://www.google.com/foo?bar=baz#",
- "base": null,
- "href": "http://www.google.com/foo?bar=baz#",
- "origin": "http://www.google.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "www.google.com",
- "hostname": "www.google.com",
- "port": "",
- "pathname": "/foo",
- "search": "?bar=baz",
- "hash": ""
- },
- {
- "input": "http://www.google.com/foo?bar=baz# »",
- "base": null,
- "href": "http://www.google.com/foo?bar=baz#%20%C2%BB",
- "origin": "http://www.google.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "www.google.com",
- "hostname": "www.google.com",
- "port": "",
- "pathname": "/foo",
- "search": "?bar=baz",
- "hash": "#%20%C2%BB"
- },
- {
- "input": "data:test# »",
- "base": null,
- "href": "data:test#%20%C2%BB",
- "origin": "null",
- "protocol": "data:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "test",
- "search": "",
- "hash": "#%20%C2%BB"
- },
- {
- "input": "http://www.google.com",
- "base": null,
- "href": "http://www.google.com/",
- "origin": "http://www.google.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "www.google.com",
- "hostname": "www.google.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://192.0x00A80001",
- "base": null,
- "href": "http://192.168.0.1/",
- "origin": "http://192.168.0.1",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "192.168.0.1",
- "hostname": "192.168.0.1",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://www/foo%2Ehtml",
- "base": null,
- "href": "http://www/foo%2Ehtml",
- "origin": "http://www",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "www",
- "hostname": "www",
- "port": "",
- "pathname": "/foo%2Ehtml",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://www/foo/%2E/html",
- "base": null,
- "href": "http://www/foo/html",
- "origin": "http://www",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "www",
- "hostname": "www",
- "port": "",
- "pathname": "/foo/html",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://user:pass@/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://%25DOMAIN:foobar@foodomain.com/",
- "base": null,
- "href": "http://%25DOMAIN:foobar@foodomain.com/",
- "origin": "http://foodomain.com",
- "protocol": "http:",
- "username": "%25DOMAIN",
- "password": "foobar",
- "host": "foodomain.com",
- "hostname": "foodomain.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http:\\\\www.google.com\\foo",
- "base": null,
- "href": "http://www.google.com/foo",
- "origin": "http://www.google.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "www.google.com",
- "hostname": "www.google.com",
- "port": "",
- "pathname": "/foo",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://foo:80/",
- "base": null,
- "href": "http://foo/",
- "origin": "http://foo",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "foo",
- "hostname": "foo",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://foo:81/",
- "base": null,
- "href": "http://foo:81/",
- "origin": "http://foo:81",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "foo:81",
- "hostname": "foo",
- "port": "81",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "httpa://foo:80/",
- "base": null,
- "href": "httpa://foo:80/",
- "origin": "null",
- "protocol": "httpa:",
- "username": "",
- "password": "",
- "host": "foo:80",
- "hostname": "foo",
- "port": "80",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://foo:-80/",
- "base": null,
- "failure": true
- },
- {
- "input": "https://foo:443/",
- "base": null,
- "href": "https://foo/",
- "origin": "https://foo",
- "protocol": "https:",
- "username": "",
- "password": "",
- "host": "foo",
- "hostname": "foo",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "https://foo:80/",
- "base": null,
- "href": "https://foo:80/",
- "origin": "https://foo:80",
- "protocol": "https:",
- "username": "",
- "password": "",
- "host": "foo:80",
- "hostname": "foo",
- "port": "80",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "ftp://foo:21/",
- "base": null,
- "href": "ftp://foo/",
- "origin": "ftp://foo",
- "protocol": "ftp:",
- "username": "",
- "password": "",
- "host": "foo",
- "hostname": "foo",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "ftp://foo:80/",
- "base": null,
- "href": "ftp://foo:80/",
- "origin": "ftp://foo:80",
- "protocol": "ftp:",
- "username": "",
- "password": "",
- "host": "foo:80",
- "hostname": "foo",
- "port": "80",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "gopher://foo:70/",
- "base": null,
- "href": "gopher://foo:70/",
- "origin": "null",
- "protocol": "gopher:",
- "username": "",
- "password": "",
- "host": "foo:70",
- "hostname": "foo",
- "port": "70",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "gopher://foo:443/",
- "base": null,
- "href": "gopher://foo:443/",
- "origin": "null",
- "protocol": "gopher:",
- "username": "",
- "password": "",
- "host": "foo:443",
- "hostname": "foo",
- "port": "443",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "ws://foo:80/",
- "base": null,
- "href": "ws://foo/",
- "origin": "ws://foo",
- "protocol": "ws:",
- "username": "",
- "password": "",
- "host": "foo",
- "hostname": "foo",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "ws://foo:81/",
- "base": null,
- "href": "ws://foo:81/",
- "origin": "ws://foo:81",
- "protocol": "ws:",
- "username": "",
- "password": "",
- "host": "foo:81",
- "hostname": "foo",
- "port": "81",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "ws://foo:443/",
- "base": null,
- "href": "ws://foo:443/",
- "origin": "ws://foo:443",
- "protocol": "ws:",
- "username": "",
- "password": "",
- "host": "foo:443",
- "hostname": "foo",
- "port": "443",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "ws://foo:815/",
- "base": null,
- "href": "ws://foo:815/",
- "origin": "ws://foo:815",
- "protocol": "ws:",
- "username": "",
- "password": "",
- "host": "foo:815",
- "hostname": "foo",
- "port": "815",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "wss://foo:80/",
- "base": null,
- "href": "wss://foo:80/",
- "origin": "wss://foo:80",
- "protocol": "wss:",
- "username": "",
- "password": "",
- "host": "foo:80",
- "hostname": "foo",
- "port": "80",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "wss://foo:81/",
- "base": null,
- "href": "wss://foo:81/",
- "origin": "wss://foo:81",
- "protocol": "wss:",
- "username": "",
- "password": "",
- "host": "foo:81",
- "hostname": "foo",
- "port": "81",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "wss://foo:443/",
- "base": null,
- "href": "wss://foo/",
- "origin": "wss://foo",
- "protocol": "wss:",
- "username": "",
- "password": "",
- "host": "foo",
- "hostname": "foo",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "wss://foo:815/",
- "base": null,
- "href": "wss://foo:815/",
- "origin": "wss://foo:815",
- "protocol": "wss:",
- "username": "",
- "password": "",
- "host": "foo:815",
- "hostname": "foo",
- "port": "815",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http:/example.com/",
- "base": null,
- "href": "http://example.com/",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "ftp:/example.com/",
- "base": null,
- "href": "ftp://example.com/",
- "origin": "ftp://example.com",
- "protocol": "ftp:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "https:/example.com/",
- "base": null,
- "href": "https://example.com/",
- "origin": "https://example.com",
- "protocol": "https:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "madeupscheme:/example.com/",
- "base": null,
- "href": "madeupscheme:/example.com/",
- "origin": "null",
- "protocol": "madeupscheme:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/example.com/",
- "search": "",
- "hash": ""
- },
- {
- "input": "file:/example.com/",
- "base": null,
- "href": "file:///example.com/",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/example.com/",
- "search": "",
- "hash": ""
- },
- {
- "input": "ftps:/example.com/",
- "base": null,
- "href": "ftps:/example.com/",
- "origin": "null",
- "protocol": "ftps:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/example.com/",
- "search": "",
- "hash": ""
- },
- {
- "input": "gopher:/example.com/",
- "base": null,
- "href": "gopher:/example.com/",
- "origin": "null",
- "protocol": "gopher:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/example.com/",
- "search": "",
- "hash": ""
- },
- {
- "input": "ws:/example.com/",
- "base": null,
- "href": "ws://example.com/",
- "origin": "ws://example.com",
- "protocol": "ws:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "wss:/example.com/",
- "base": null,
- "href": "wss://example.com/",
- "origin": "wss://example.com",
- "protocol": "wss:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "data:/example.com/",
- "base": null,
- "href": "data:/example.com/",
- "origin": "null",
- "protocol": "data:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/example.com/",
- "search": "",
- "hash": ""
- },
- {
- "input": "javascript:/example.com/",
- "base": null,
- "href": "javascript:/example.com/",
- "origin": "null",
- "protocol": "javascript:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/example.com/",
- "search": "",
- "hash": ""
- },
- {
- "input": "mailto:/example.com/",
- "base": null,
- "href": "mailto:/example.com/",
- "origin": "null",
- "protocol": "mailto:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/example.com/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http:example.com/",
- "base": null,
- "href": "http://example.com/",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "ftp:example.com/",
- "base": null,
- "href": "ftp://example.com/",
- "origin": "ftp://example.com",
- "protocol": "ftp:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "https:example.com/",
- "base": null,
- "href": "https://example.com/",
- "origin": "https://example.com",
- "protocol": "https:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "madeupscheme:example.com/",
- "base": null,
- "href": "madeupscheme:example.com/",
- "origin": "null",
- "protocol": "madeupscheme:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "example.com/",
- "search": "",
- "hash": ""
- },
- {
- "input": "ftps:example.com/",
- "base": null,
- "href": "ftps:example.com/",
- "origin": "null",
- "protocol": "ftps:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "example.com/",
- "search": "",
- "hash": ""
- },
- {
- "input": "gopher:example.com/",
- "base": null,
- "href": "gopher:example.com/",
- "origin": "null",
- "protocol": "gopher:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "example.com/",
- "search": "",
- "hash": ""
- },
- {
- "input": "ws:example.com/",
- "base": null,
- "href": "ws://example.com/",
- "origin": "ws://example.com",
- "protocol": "ws:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "wss:example.com/",
- "base": null,
- "href": "wss://example.com/",
- "origin": "wss://example.com",
- "protocol": "wss:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "data:example.com/",
- "base": null,
- "href": "data:example.com/",
- "origin": "null",
- "protocol": "data:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "example.com/",
- "search": "",
- "hash": ""
- },
- {
- "input": "javascript:example.com/",
- "base": null,
- "href": "javascript:example.com/",
- "origin": "null",
- "protocol": "javascript:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "example.com/",
- "search": "",
- "hash": ""
- },
- {
- "input": "mailto:example.com/",
- "base": null,
- "href": "mailto:example.com/",
- "origin": "null",
- "protocol": "mailto:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "example.com/",
- "search": "",
- "hash": ""
- },
- {
- "input": "https://example.com/aaa/bbb/%2e%2e?query",
- "base": null,
- "href": "https://example.com/aaa/?query",
- "origin": "https://example.com",
- "protocol": "https:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/aaa/",
- "search": "?query",
- "hash": ""
- },
- "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/segments-userinfo-vs-host.html",
- {
- "input": "http:@www.example.com",
- "base": null,
- "href": "http://www.example.com/",
- "origin": "http://www.example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "www.example.com",
- "hostname": "www.example.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http:/@www.example.com",
- "base": null,
- "href": "http://www.example.com/",
- "origin": "http://www.example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "www.example.com",
- "hostname": "www.example.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://@www.example.com",
- "base": null,
- "href": "http://www.example.com/",
- "origin": "http://www.example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "www.example.com",
- "hostname": "www.example.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http:a:b@www.example.com",
- "base": null,
- "href": "http://a:b@www.example.com/",
- "origin": "http://www.example.com",
- "protocol": "http:",
- "username": "a",
- "password": "b",
- "host": "www.example.com",
- "hostname": "www.example.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http:/a:b@www.example.com",
- "base": null,
- "href": "http://a:b@www.example.com/",
- "origin": "http://www.example.com",
- "protocol": "http:",
- "username": "a",
- "password": "b",
- "host": "www.example.com",
- "hostname": "www.example.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://a:b@www.example.com",
- "base": null,
- "href": "http://a:b@www.example.com/",
- "origin": "http://www.example.com",
- "protocol": "http:",
- "username": "a",
- "password": "b",
- "host": "www.example.com",
- "hostname": "www.example.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://@pple.com",
- "base": null,
- "href": "http://pple.com/",
- "origin": "http://pple.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "pple.com",
- "hostname": "pple.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http::b@www.example.com",
- "base": null,
- "href": "http://:b@www.example.com/",
- "origin": "http://www.example.com",
- "protocol": "http:",
- "username": "",
- "password": "b",
- "host": "www.example.com",
- "hostname": "www.example.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http:/:b@www.example.com",
- "base": null,
- "href": "http://:b@www.example.com/",
- "origin": "http://www.example.com",
- "protocol": "http:",
- "username": "",
- "password": "b",
- "host": "www.example.com",
- "hostname": "www.example.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://:b@www.example.com",
- "base": null,
- "href": "http://:b@www.example.com/",
- "origin": "http://www.example.com",
- "protocol": "http:",
- "username": "",
- "password": "b",
- "host": "www.example.com",
- "hostname": "www.example.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http:/:@/www.example.com",
- "base": null,
- "failure": true,
- "relativeTo": "non-opaque-path-base"
- },
- {
- "input": "http://user@/www.example.com",
- "base": null,
- "failure": true
- },
- {
- "input": "http:@/www.example.com",
- "base": null,
- "failure": true,
- "relativeTo": "non-opaque-path-base"
- },
- {
- "input": "http:/@/www.example.com",
- "base": null,
- "failure": true,
- "relativeTo": "non-opaque-path-base"
- },
- {
- "input": "http://@/www.example.com",
- "base": null,
- "failure": true
- },
- {
- "input": "https:@/www.example.com",
- "base": null,
- "failure": true,
- "relativeTo": "non-opaque-path-base"
- },
- {
- "input": "http:a:b@/www.example.com",
- "base": null,
- "failure": true,
- "relativeTo": "non-opaque-path-base"
- },
- {
- "input": "http:/a:b@/www.example.com",
- "base": null,
- "failure": true,
- "relativeTo": "non-opaque-path-base"
- },
- {
- "input": "http://a:b@/www.example.com",
- "base": null,
- "failure": true
- },
- {
- "input": "http::@/www.example.com",
- "base": null,
- "failure": true,
- "relativeTo": "non-opaque-path-base"
- },
- {
- "input": "http:a:@www.example.com",
- "base": null,
- "href": "http://a@www.example.com/",
- "origin": "http://www.example.com",
- "protocol": "http:",
- "username": "a",
- "password": "",
- "host": "www.example.com",
- "hostname": "www.example.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http:/a:@www.example.com",
- "base": null,
- "href": "http://a@www.example.com/",
- "origin": "http://www.example.com",
- "protocol": "http:",
- "username": "a",
- "password": "",
- "host": "www.example.com",
- "hostname": "www.example.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://a:@www.example.com",
- "base": null,
- "href": "http://a@www.example.com/",
- "origin": "http://www.example.com",
- "protocol": "http:",
- "username": "a",
- "password": "",
- "host": "www.example.com",
- "hostname": "www.example.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://www.@pple.com",
- "base": null,
- "href": "http://www.@pple.com/",
- "origin": "http://pple.com",
- "protocol": "http:",
- "username": "www.",
- "password": "",
- "host": "pple.com",
- "hostname": "pple.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http:@:www.example.com",
- "base": null,
- "failure": true,
- "relativeTo": "non-opaque-path-base"
- },
- {
- "input": "http:/@:www.example.com",
- "base": null,
- "failure": true,
- "relativeTo": "non-opaque-path-base"
- },
- {
- "input": "http://@:www.example.com",
- "base": null,
- "failure": true
- },
- {
- "input": "http://:@www.example.com",
- "base": null,
- "href": "http://www.example.com/",
- "origin": "http://www.example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "www.example.com",
- "hostname": "www.example.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- "# Others",
- {
- "input": "/",
- "base": "http://www.example.com/test",
- "href": "http://www.example.com/",
- "origin": "http://www.example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "www.example.com",
- "hostname": "www.example.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "/test.txt",
- "base": "http://www.example.com/test",
- "href": "http://www.example.com/test.txt",
- "origin": "http://www.example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "www.example.com",
- "hostname": "www.example.com",
- "port": "",
- "pathname": "/test.txt",
- "search": "",
- "hash": ""
- },
- {
- "input": ".",
- "base": "http://www.example.com/test",
- "href": "http://www.example.com/",
- "origin": "http://www.example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "www.example.com",
- "hostname": "www.example.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "..",
- "base": "http://www.example.com/test",
- "href": "http://www.example.com/",
- "origin": "http://www.example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "www.example.com",
- "hostname": "www.example.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "test.txt",
- "base": "http://www.example.com/test",
- "href": "http://www.example.com/test.txt",
- "origin": "http://www.example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "www.example.com",
- "hostname": "www.example.com",
- "port": "",
- "pathname": "/test.txt",
- "search": "",
- "hash": ""
- },
- {
- "input": "./test.txt",
- "base": "http://www.example.com/test",
- "href": "http://www.example.com/test.txt",
- "origin": "http://www.example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "www.example.com",
- "hostname": "www.example.com",
- "port": "",
- "pathname": "/test.txt",
- "search": "",
- "hash": ""
- },
- {
- "input": "../test.txt",
- "base": "http://www.example.com/test",
- "href": "http://www.example.com/test.txt",
- "origin": "http://www.example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "www.example.com",
- "hostname": "www.example.com",
- "port": "",
- "pathname": "/test.txt",
- "search": "",
- "hash": ""
- },
- {
- "input": "../aaa/test.txt",
- "base": "http://www.example.com/test",
- "href": "http://www.example.com/aaa/test.txt",
- "origin": "http://www.example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "www.example.com",
- "hostname": "www.example.com",
- "port": "",
- "pathname": "/aaa/test.txt",
- "search": "",
- "hash": ""
- },
- {
- "input": "../../test.txt",
- "base": "http://www.example.com/test",
- "href": "http://www.example.com/test.txt",
- "origin": "http://www.example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "www.example.com",
- "hostname": "www.example.com",
- "port": "",
- "pathname": "/test.txt",
- "search": "",
- "hash": ""
- },
- {
- "input": "中/test.txt",
- "base": "http://www.example.com/test",
- "href": "http://www.example.com/%E4%B8%AD/test.txt",
- "origin": "http://www.example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "www.example.com",
- "hostname": "www.example.com",
- "port": "",
- "pathname": "/%E4%B8%AD/test.txt",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://www.example2.com",
- "base": "http://www.example.com/test",
- "href": "http://www.example2.com/",
- "origin": "http://www.example2.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "www.example2.com",
- "hostname": "www.example2.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "//www.example2.com",
- "base": "http://www.example.com/test",
- "href": "http://www.example2.com/",
- "origin": "http://www.example2.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "www.example2.com",
- "hostname": "www.example2.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "file:...",
- "base": "http://www.example.com/test",
- "href": "file:///...",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/...",
- "search": "",
- "hash": ""
- },
- {
- "input": "file:..",
- "base": "http://www.example.com/test",
- "href": "file:///",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "file:a",
- "base": "http://www.example.com/test",
- "href": "file:///a",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/a",
- "search": "",
- "hash": ""
- },
- {
- "input": "file:.",
- "base": null,
- "href": "file:///",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "file:.",
- "base": "http://www.example.com/test",
- "href": "file:///",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/host.html",
- "Basic canonicalization, uppercase should be converted to lowercase",
- {
- "input": "http://ExAmPlE.CoM",
- "base": "http://other.com/",
- "href": "http://example.com/",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://example example.com",
- "base": "http://other.com/",
- "failure": true
- },
- {
- "input": "http://Goo%20 goo%7C|.com",
- "base": "http://other.com/",
- "failure": true
- },
- {
- "input": "http://[]",
- "base": "http://other.com/",
- "failure": true
- },
- {
- "input": "http://[:]",
- "base": "http://other.com/",
- "failure": true
- },
- "U+3000 is mapped to U+0020 (space) which is disallowed",
- {
- "input": "http://GOO\u00a0\u3000goo.com",
- "base": "http://other.com/",
- "failure": true
- },
- "Other types of space (no-break, zero-width, zero-width-no-break) are name-prepped away to nothing. U+200B, U+2060, and U+FEFF, are ignored",
- {
- "input": "http://GOO\u200b\u2060\ufeffgoo.com",
- "base": "http://other.com/",
- "href": "http://googoo.com/",
- "origin": "http://googoo.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "googoo.com",
- "hostname": "googoo.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- "Leading and trailing C0 control or space",
- {
- "input": "\u0000\u001b\u0004\u0012 http://example.com/\u001f \u000d ",
- "base": null,
- "href": "http://example.com/",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "non-special:opaque ",
- "base": null,
- "href": "non-special:opaque",
- "origin": "null",
- "protocol": "non-special:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "opaque",
- "search": "",
- "hash": ""
- },
- {
- "input": "non-special:opaque ?hi",
- "base": null,
- "href": "non-special:opaque %20?hi",
- "origin": "null",
- "protocol": "non-special:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "opaque %20",
- "search": "?hi",
- "hash": ""
- },
- {
- "input": "non-special:opaque #hi",
- "base": null,
- "href": "non-special:opaque %20#hi",
- "origin": "null",
- "protocol": "non-special:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "opaque %20",
- "search": "",
- "hash": "#hi"
- },
- {
- "input": "non-special:opaque x?hi",
- "base": null,
- "href": "non-special:opaque x?hi",
- "origin": "null",
- "protocol": "non-special:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "opaque x",
- "search": "?hi",
- "hash": ""
- },
- {
- "input": "non-special:opaque x#hi",
- "base": null,
- "href": "non-special:opaque x#hi",
- "origin": "null",
- "protocol": "non-special:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "opaque x",
- "search": "",
- "hash": "#hi"
- },
- {
- "input": "non-special:opaque \t\t \t#hi",
- "base": null,
- "href": "non-special:opaque %20#hi",
- "origin": "null",
- "protocol": "non-special:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "opaque %20",
- "search": "",
- "hash": "#hi"
- },
- {
- "input": "non-special:opaque \t\t #hi",
- "base": null,
- "href": "non-special:opaque %20#hi",
- "origin": "null",
- "protocol": "non-special:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "opaque %20",
- "search": "",
- "hash": "#hi"
- },
- {
- "input": "non-special:opaque\t\t \r #hi",
- "base": null,
- "href": "non-special:opaque %20#hi",
- "origin": "null",
- "protocol": "non-special:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "opaque %20",
- "search": "",
- "hash": "#hi"
- },
- "Ideographic full stop (full-width period for Chinese, etc.) should be treated as a dot. U+3002 is mapped to U+002E (dot)",
- {
- "input": "http://www.foo。bar.com",
- "base": "http://other.com/",
- "href": "http://www.foo.bar.com/",
- "origin": "http://www.foo.bar.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "www.foo.bar.com",
- "hostname": "www.foo.bar.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- "Invalid unicode characters should fail... U+FDD0 is disallowed; %ef%b7%90 is U+FDD0",
- {
- "input": "http://\ufdd0zyx.com",
- "base": "http://other.com/",
- "failure": true
- },
- "This is the same as previous but escaped",
- {
- "input": "http://%ef%b7%90zyx.com",
- "base": "http://other.com/",
- "failure": true
- },
- "U+FFFD",
- {
- "input": "https://\ufffd",
- "base": null,
- "failure": true
- },
- {
- "input": "https://%EF%BF%BD",
- "base": null,
- "failure": true
- },
- {
- "input": "https://x/\ufffd?\ufffd#\ufffd",
- "base": null,
- "href": "https://x/%EF%BF%BD?%EF%BF%BD#%EF%BF%BD",
- "origin": "https://x",
- "protocol": "https:",
- "username": "",
- "password": "",
- "host": "x",
- "hostname": "x",
- "port": "",
- "pathname": "/%EF%BF%BD",
- "search": "?%EF%BF%BD",
- "hash": "#%EF%BF%BD"
- },
- "Domain is ASCII, but a label is invalid IDNA",
- {
- "input": "http://a.b.c.xn--pokxncvks",
- "base": null,
- "failure": true
- },
- {
- "input": "http://10.0.0.xn--pokxncvks",
- "base": null,
- "failure": true
- },
- "IDNA labels should be matched case-insensitively",
- {
- "input": "http://a.b.c.XN--pokxncvks",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a.b.c.Xn--pokxncvks",
- "base": null,
- "failure": true
- },
- {
- "input": "http://10.0.0.XN--pokxncvks",
- "base": null,
- "failure": true
- },
- {
- "input": "http://10.0.0.xN--pokxncvks",
- "base": null,
- "failure": true
- },
- "Test name prepping, fullwidth input should be converted to ASCII and NOT IDN-ized. This is 'Go' in fullwidth UTF-8/UTF-16.",
- {
- "input": "http://Go.com",
- "base": "http://other.com/",
- "href": "http://go.com/",
- "origin": "http://go.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "go.com",
- "hostname": "go.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- "URL spec forbids the following. https://www.w3.org/Bugs/Public/show_bug.cgi?id=24257",
- {
- "input": "http://%41.com",
- "base": "http://other.com/",
- "failure": true
- },
- {
- "input": "http://%ef%bc%85%ef%bc%94%ef%bc%91.com",
- "base": "http://other.com/",
- "failure": true
- },
- "...%00 in fullwidth should fail (also as escaped UTF-8 input)",
- {
- "input": "http://%00.com",
- "base": "http://other.com/",
- "failure": true
- },
- {
- "input": "http://%ef%bc%85%ef%bc%90%ef%bc%90.com",
- "base": "http://other.com/",
- "failure": true
- },
- "Basic IDN support, UTF-8 and UTF-16 input should be converted to IDN",
- {
- "input": "http://你好你好",
- "base": "http://other.com/",
- "href": "http://xn--6qqa088eba/",
- "origin": "http://xn--6qqa088eba",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "xn--6qqa088eba",
- "hostname": "xn--6qqa088eba",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "https://faß.ExAmPlE/",
- "base": null,
- "href": "https://xn--fa-hia.example/",
- "origin": "https://xn--fa-hia.example",
- "protocol": "https:",
- "username": "",
- "password": "",
- "host": "xn--fa-hia.example",
- "hostname": "xn--fa-hia.example",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "sc://faß.ExAmPlE/",
- "base": null,
- "href": "sc://fa%C3%9F.ExAmPlE/",
- "origin": "null",
- "protocol": "sc:",
- "username": "",
- "password": "",
- "host": "fa%C3%9F.ExAmPlE",
- "hostname": "fa%C3%9F.ExAmPlE",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- "Invalid escaped characters should fail and the percents should be escaped. https://www.w3.org/Bugs/Public/show_bug.cgi?id=24191",
- {
- "input": "http://%zz%66%a.com",
- "base": "http://other.com/",
- "failure": true
- },
- "If we get an invalid character that has been escaped.",
- {
- "input": "http://%25",
- "base": "http://other.com/",
- "failure": true
- },
- {
- "input": "http://hello%00",
- "base": "http://other.com/",
- "failure": true
- },
- "Escaped numbers should be treated like IP addresses if they are.",
- {
- "input": "http://%30%78%63%30%2e%30%32%35%30.01",
- "base": "http://other.com/",
- "href": "http://192.168.0.1/",
- "origin": "http://192.168.0.1",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "192.168.0.1",
- "hostname": "192.168.0.1",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://%30%78%63%30%2e%30%32%35%30.01%2e",
- "base": "http://other.com/",
- "href": "http://192.168.0.1/",
- "origin": "http://192.168.0.1",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "192.168.0.1",
- "hostname": "192.168.0.1",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://192.168.0.257",
- "base": "http://other.com/",
- "failure": true
- },
- "Invalid escaping in hosts causes failure",
- {
- "input": "http://%3g%78%63%30%2e%30%32%35%30%2E.01",
- "base": "http://other.com/",
- "failure": true
- },
- "A space in a host causes failure",
- {
- "input": "http://192.168.0.1 hello",
- "base": "http://other.com/",
- "failure": true
- },
- {
- "input": "https://x x:12",
- "base": null,
- "failure": true
- },
- "Fullwidth and escaped UTF-8 fullwidth should still be treated as IP",
- {
- "input": "http://0Xc0.0250.01",
- "base": "http://other.com/",
- "href": "http://192.168.0.1/",
- "origin": "http://192.168.0.1",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "192.168.0.1",
- "hostname": "192.168.0.1",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- "Domains with empty labels",
- {
- "input": "http://./",
- "base": null,
- "href": "http://./",
- "origin": "http://.",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": ".",
- "hostname": ".",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://../",
- "base": null,
- "href": "http://../",
- "origin": "http://..",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "..",
- "hostname": "..",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- "Non-special domains with empty labels",
- {
- "input": "h://.",
- "base": null,
- "href": "h://.",
- "origin": "null",
- "protocol": "h:",
- "username": "",
- "password": "",
- "host": ".",
- "hostname": ".",
- "port": "",
- "pathname": "",
- "search": "",
- "hash": ""
- },
- "Broken IPv6",
- {
- "input": "http://[www.google.com]/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://[google.com]",
- "base": "http://other.com/",
- "failure": true
- },
- {
- "input": "http://[::1.2.3.4x]",
- "base": "http://other.com/",
- "failure": true
- },
- {
- "input": "http://[::1.2.3.]",
- "base": "http://other.com/",
- "failure": true
- },
- {
- "input": "http://[::1.2.]",
- "base": "http://other.com/",
- "failure": true
- },
- {
- "input": "http://[::.1.2]",
- "base": "http://other.com/",
- "failure": true
- },
- {
- "input": "http://[::1.]",
- "base": "http://other.com/",
- "failure": true
- },
- {
- "input": "http://[::.1]",
- "base": "http://other.com/",
- "failure": true
- },
- {
- "input": "http://[::%31]",
- "base": "http://other.com/",
- "failure": true
- },
- {
- "input": "http://%5B::1]",
- "base": "http://other.com/",
- "failure": true
- },
- "Misc Unicode",
- {
- "input": "http://foo:💩@example.com/bar",
- "base": "http://other.com/",
- "href": "http://foo:%F0%9F%92%A9@example.com/bar",
- "origin": "http://example.com",
- "protocol": "http:",
- "username": "foo",
- "password": "%F0%9F%92%A9",
- "host": "example.com",
- "hostname": "example.com",
- "port": "",
- "pathname": "/bar",
- "search": "",
- "hash": ""
- },
- "# resolving a fragment against any scheme succeeds",
- {
- "input": "#",
- "base": "test:test",
- "href": "test:test#",
- "origin": "null",
- "protocol": "test:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "test",
- "search": "",
- "hash": ""
- },
- {
- "input": "#x",
- "base": "mailto:x@x.com",
- "href": "mailto:x@x.com#x",
- "origin": "null",
- "protocol": "mailto:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "x@x.com",
- "search": "",
- "hash": "#x"
- },
- {
- "input": "#x",
- "base": "data:,",
- "href": "data:,#x",
- "origin": "null",
- "protocol": "data:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": ",",
- "search": "",
- "hash": "#x"
- },
- {
- "input": "#x",
- "base": "about:blank",
- "href": "about:blank#x",
- "origin": "null",
- "protocol": "about:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "blank",
- "search": "",
- "hash": "#x"
- },
- {
- "input": "#x:y",
- "base": "about:blank",
- "href": "about:blank#x:y",
- "origin": "null",
- "protocol": "about:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "blank",
- "search": "",
- "hash": "#x:y"
- },
- {
- "input": "#",
- "base": "test:test?test",
- "href": "test:test?test#",
- "origin": "null",
- "protocol": "test:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "test",
- "search": "?test",
- "hash": ""
- },
- "# multiple @ in authority state",
- {
- "input": "https://@test@test@example:800/",
- "base": "http://doesnotmatter/",
- "href": "https://%40test%40test@example:800/",
- "origin": "https://example:800",
- "protocol": "https:",
- "username": "%40test%40test",
- "password": "",
- "host": "example:800",
- "hostname": "example",
- "port": "800",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "https://@@@example",
- "base": "http://doesnotmatter/",
- "href": "https://%40%40@example/",
- "origin": "https://example",
- "protocol": "https:",
- "username": "%40%40",
- "password": "",
- "host": "example",
- "hostname": "example",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- "non-az-09 characters",
- {
- "input": "http://`{}:`{}@h/`{}?`{}",
- "base": "http://doesnotmatter/",
- "href": "http://%60%7B%7D:%60%7B%7D@h/%60%7B%7D?`{}",
- "origin": "http://h",
- "protocol": "http:",
- "username": "%60%7B%7D",
- "password": "%60%7B%7D",
- "host": "h",
- "hostname": "h",
- "port": "",
- "pathname": "/%60%7B%7D",
- "search": "?`{}",
- "hash": ""
- },
- "byte is ' and url is special",
- {
- "input": "http://host/?'",
- "base": null,
- "href": "http://host/?%27",
- "origin": "http://host",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "host",
- "hostname": "host",
- "port": "",
- "pathname": "/",
- "search": "?%27",
- "hash": ""
- },
- {
- "input": "notspecial://host/?'",
- "base": null,
- "href": "notspecial://host/?'",
- "origin": "null",
- "protocol": "notspecial:",
- "username": "",
- "password": "",
- "host": "host",
- "hostname": "host",
- "port": "",
- "pathname": "/",
- "search": "?'",
- "hash": ""
- },
- "# Credentials in base",
- {
- "input": "/some/path",
- "base": "http://user@example.org/smth",
- "href": "http://user@example.org/some/path",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "user",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/some/path",
- "search": "",
- "hash": ""
- },
- {
- "input": "",
- "base": "http://user:pass@example.org:21/smth",
- "href": "http://user:pass@example.org:21/smth",
- "origin": "http://example.org:21",
- "protocol": "http:",
- "username": "user",
- "password": "pass",
- "host": "example.org:21",
- "hostname": "example.org",
- "port": "21",
- "pathname": "/smth",
- "search": "",
- "hash": ""
- },
- {
- "input": "/some/path",
- "base": "http://user:pass@example.org:21/smth",
- "href": "http://user:pass@example.org:21/some/path",
- "origin": "http://example.org:21",
- "protocol": "http:",
- "username": "user",
- "password": "pass",
- "host": "example.org:21",
- "hostname": "example.org",
- "port": "21",
- "pathname": "/some/path",
- "search": "",
- "hash": ""
- },
- "# a set of tests designed by zcorpan for relative URLs with unknown schemes",
- {
- "input": "i",
- "base": "sc:sd",
- "failure": true
- },
- {
- "input": "i",
- "base": "sc:sd/sd",
- "failure": true
- },
- {
- "input": "i",
- "base": "sc:/pa/pa",
- "href": "sc:/pa/i",
- "origin": "null",
- "protocol": "sc:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/pa/i",
- "search": "",
- "hash": ""
- },
- {
- "input": "i",
- "base": "sc://ho/pa",
- "href": "sc://ho/i",
- "origin": "null",
- "protocol": "sc:",
- "username": "",
- "password": "",
- "host": "ho",
- "hostname": "ho",
- "port": "",
- "pathname": "/i",
- "search": "",
- "hash": ""
- },
- {
- "input": "i",
- "base": "sc:///pa/pa",
- "href": "sc:///pa/i",
- "origin": "null",
- "protocol": "sc:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/pa/i",
- "search": "",
- "hash": ""
- },
- {
- "input": "../i",
- "base": "sc:sd",
- "failure": true
- },
- {
- "input": "../i",
- "base": "sc:sd/sd",
- "failure": true
- },
- {
- "input": "../i",
- "base": "sc:/pa/pa",
- "href": "sc:/i",
- "origin": "null",
- "protocol": "sc:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/i",
- "search": "",
- "hash": ""
- },
- {
- "input": "../i",
- "base": "sc://ho/pa",
- "href": "sc://ho/i",
- "origin": "null",
- "protocol": "sc:",
- "username": "",
- "password": "",
- "host": "ho",
- "hostname": "ho",
- "port": "",
- "pathname": "/i",
- "search": "",
- "hash": ""
- },
- {
- "input": "../i",
- "base": "sc:///pa/pa",
- "href": "sc:///i",
- "origin": "null",
- "protocol": "sc:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/i",
- "search": "",
- "hash": ""
- },
- {
- "input": "/i",
- "base": "sc:sd",
- "failure": true
- },
- {
- "input": "/i",
- "base": "sc:sd/sd",
- "failure": true
- },
- {
- "input": "/i",
- "base": "sc:/pa/pa",
- "href": "sc:/i",
- "origin": "null",
- "protocol": "sc:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/i",
- "search": "",
- "hash": ""
- },
- {
- "input": "/i",
- "base": "sc://ho/pa",
- "href": "sc://ho/i",
- "origin": "null",
- "protocol": "sc:",
- "username": "",
- "password": "",
- "host": "ho",
- "hostname": "ho",
- "port": "",
- "pathname": "/i",
- "search": "",
- "hash": ""
- },
- {
- "input": "/i",
- "base": "sc:///pa/pa",
- "href": "sc:///i",
- "origin": "null",
- "protocol": "sc:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/i",
- "search": "",
- "hash": ""
- },
- {
- "input": "?i",
- "base": "sc:sd",
- "failure": true
- },
- {
- "input": "?i",
- "base": "sc:sd/sd",
- "failure": true
- },
- {
- "input": "?i",
- "base": "sc:/pa/pa",
- "href": "sc:/pa/pa?i",
- "origin": "null",
- "protocol": "sc:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/pa/pa",
- "search": "?i",
- "hash": ""
- },
- {
- "input": "?i",
- "base": "sc://ho/pa",
- "href": "sc://ho/pa?i",
- "origin": "null",
- "protocol": "sc:",
- "username": "",
- "password": "",
- "host": "ho",
- "hostname": "ho",
- "port": "",
- "pathname": "/pa",
- "search": "?i",
- "hash": ""
- },
- {
- "input": "?i",
- "base": "sc:///pa/pa",
- "href": "sc:///pa/pa?i",
- "origin": "null",
- "protocol": "sc:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/pa/pa",
- "search": "?i",
- "hash": ""
- },
- {
- "input": "#i",
- "base": "sc:sd",
- "href": "sc:sd#i",
- "origin": "null",
- "protocol": "sc:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "sd",
- "search": "",
- "hash": "#i"
- },
- {
- "input": "#i",
- "base": "sc:sd/sd",
- "href": "sc:sd/sd#i",
- "origin": "null",
- "protocol": "sc:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "sd/sd",
- "search": "",
- "hash": "#i"
- },
- {
- "input": "#i",
- "base": "sc:/pa/pa",
- "href": "sc:/pa/pa#i",
- "origin": "null",
- "protocol": "sc:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/pa/pa",
- "search": "",
- "hash": "#i"
- },
- {
- "input": "#i",
- "base": "sc://ho/pa",
- "href": "sc://ho/pa#i",
- "origin": "null",
- "protocol": "sc:",
- "username": "",
- "password": "",
- "host": "ho",
- "hostname": "ho",
- "port": "",
- "pathname": "/pa",
- "search": "",
- "hash": "#i"
- },
- {
- "input": "#i",
- "base": "sc:///pa/pa",
- "href": "sc:///pa/pa#i",
- "origin": "null",
- "protocol": "sc:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/pa/pa",
- "search": "",
- "hash": "#i"
- },
- "# make sure that relative URL logic works on known typically non-relative schemes too",
- {
- "input": "about:/../",
- "base": null,
- "href": "about:/",
- "origin": "null",
- "protocol": "about:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "data:/../",
- "base": null,
- "href": "data:/",
- "origin": "null",
- "protocol": "data:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "javascript:/../",
- "base": null,
- "href": "javascript:/",
- "origin": "null",
- "protocol": "javascript:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "mailto:/../",
- "base": null,
- "href": "mailto:/",
- "origin": "null",
- "protocol": "mailto:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- "# unknown schemes and their hosts",
- {
- "input": "sc://ñ.test/",
- "base": null,
- "href": "sc://%C3%B1.test/",
- "origin": "null",
- "protocol": "sc:",
- "username": "",
- "password": "",
- "host": "%C3%B1.test",
- "hostname": "%C3%B1.test",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "sc://%/",
- "base": null,
- "href": "sc://%/",
- "protocol": "sc:",
- "username": "",
- "password": "",
- "host": "%",
- "hostname": "%",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "sc://@/",
- "base": null,
- "failure": true
- },
- {
- "input": "sc://te@s:t@/",
- "base": null,
- "failure": true
- },
- {
- "input": "sc://:/",
- "base": null,
- "failure": true
- },
- {
- "input": "sc://:12/",
- "base": null,
- "failure": true
- },
- {
- "input": "x",
- "base": "sc://ñ",
- "href": "sc://%C3%B1/x",
- "origin": "null",
- "protocol": "sc:",
- "username": "",
- "password": "",
- "host": "%C3%B1",
- "hostname": "%C3%B1",
- "port": "",
- "pathname": "/x",
- "search": "",
- "hash": ""
- },
- "# unknown schemes and backslashes",
- {
- "input": "sc:\\../",
- "base": null,
- "href": "sc:\\../",
- "origin": "null",
- "protocol": "sc:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "\\../",
- "search": "",
- "hash": ""
- },
- "# unknown scheme with path looking like a password",
- {
- "input": "sc::a@example.net",
- "base": null,
- "href": "sc::a@example.net",
- "origin": "null",
- "protocol": "sc:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": ":a@example.net",
- "search": "",
- "hash": ""
- },
- "# unknown scheme with bogus percent-encoding",
- {
- "input": "wow:%NBD",
- "base": null,
- "href": "wow:%NBD",
- "origin": "null",
- "protocol": "wow:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "%NBD",
- "search": "",
- "hash": ""
- },
- {
- "input": "wow:%1G",
- "base": null,
- "href": "wow:%1G",
- "origin": "null",
- "protocol": "wow:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "%1G",
- "search": "",
- "hash": ""
- },
- "# unknown scheme with non-URL characters",
- {
- "input": "wow:\uFFFF",
- "base": null,
- "href": "wow:%EF%BF%BF",
- "origin": "null",
- "protocol": "wow:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "%EF%BF%BF",
- "search": "",
- "hash": ""
- },
- "Forbidden host code points",
- {
- "input": "sc://a\u0000b/",
- "base": null,
- "failure": true
- },
- {
- "input": "sc://a b/",
- "base": null,
- "failure": true
- },
- {
- "input": "sc://a<b",
- "base": null,
- "failure": true
- },
- {
- "input": "sc://a>b",
- "base": null,
- "failure": true
- },
- {
- "input": "sc://a[b/",
- "base": null,
- "failure": true
- },
- {
- "input": "sc://a\\b/",
- "base": null,
- "failure": true
- },
- {
- "input": "sc://a]b/",
- "base": null,
- "failure": true
- },
- {
- "input": "sc://a^b",
- "base": null,
- "failure": true
- },
- {
- "input": "sc://a|b/",
- "base": null,
- "failure": true
- },
- "Forbidden host codepoints: tabs and newlines are removed during preprocessing",
- {
- "input": "foo://ho\u0009st/",
- "base": null,
- "hash": "",
- "host": "host",
- "hostname": "host",
- "href":"foo://host/",
- "password": "",
- "pathname": "/",
- "port":"",
- "protocol": "foo:",
- "search": "",
- "username": ""
- },
- {
- "input": "foo://ho\u000Ast/",
- "base": null,
- "hash": "",
- "host": "host",
- "hostname": "host",
- "href":"foo://host/",
- "password": "",
- "pathname": "/",
- "port":"",
- "protocol": "foo:",
- "search": "",
- "username": ""
- },
- {
- "input": "foo://ho\u000Dst/",
- "base": null,
- "hash": "",
- "host": "host",
- "hostname": "host",
- "href":"foo://host/",
- "password": "",
- "pathname": "/",
- "port":"",
- "protocol": "foo:",
- "search": "",
- "username": ""
- },
- "Forbidden domain code-points",
- {
- "input": "http://a\u0000b/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a\u0001b/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a\u0002b/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a\u0003b/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a\u0004b/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a\u0005b/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a\u0006b/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a\u0007b/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a\u0008b/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a\u000Bb/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a\u000Cb/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a\u000Eb/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a\u000Fb/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a\u0010b/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a\u0011b/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a\u0012b/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a\u0013b/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a\u0014b/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a\u0015b/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a\u0016b/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a\u0017b/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a\u0018b/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a\u0019b/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a\u001Ab/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a\u001Bb/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a\u001Cb/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a\u001Db/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a\u001Eb/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a\u001Fb/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a b/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a%b/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a<b",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a>b",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a[b/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a]b/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a^b",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a|b/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://a\u007Fb/",
- "base": null,
- "failure": true
- },
- "Forbidden domain codepoints: tabs and newlines are removed during preprocessing",
- {
- "input": "http://ho\u0009st/",
- "base": null,
- "hash": "",
- "host": "host",
- "hostname": "host",
- "href":"http://host/",
- "password": "",
- "pathname": "/",
- "port":"",
- "protocol": "http:",
- "search": "",
- "username": ""
- },
- {
- "input": "http://ho\u000Ast/",
- "base": null,
- "hash": "",
- "host": "host",
- "hostname": "host",
- "href":"http://host/",
- "password": "",
- "pathname": "/",
- "port":"",
- "protocol": "http:",
- "search": "",
- "username": ""
- },
- {
- "input": "http://ho\u000Dst/",
- "base": null,
- "hash": "",
- "host": "host",
- "hostname": "host",
- "href":"http://host/",
- "password": "",
- "pathname": "/",
- "port":"",
- "protocol": "http:",
- "search": "",
- "username": ""
- },
- "Encoded forbidden domain codepoints in special URLs",
- {
- "input": "http://ho%00st/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%01st/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%02st/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%03st/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%04st/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%05st/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%06st/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%07st/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%08st/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%09st/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%0Ast/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%0Bst/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%0Cst/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%0Dst/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%0Est/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%0Fst/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%10st/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%11st/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%12st/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%13st/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%14st/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%15st/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%16st/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%17st/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%18st/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%19st/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%1Ast/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%1Bst/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%1Cst/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%1Dst/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%1Est/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%1Fst/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%20st/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%23st/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%25st/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%2Fst/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%3Ast/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%3Cst/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%3Est/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%3Fst/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%40st/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%5Bst/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%5Cst/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%5Dst/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%7Cst/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://ho%7Fst/",
- "base": null,
- "failure": true
- },
- "Allowed host/domain code points",
- {
- "input": "http://!\"$&'()*+,-.;=_`{}~/",
- "base": null,
- "href": "http://!\"$&'()*+,-.;=_`{}~/",
- "origin": "http://!\"$&'()*+,-.;=_`{}~",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "!\"$&'()*+,-.;=_`{}~",
- "hostname": "!\"$&'()*+,-.;=_`{}~",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "sc://\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u000B\u000C\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F\u007F!\"$%&'()*+,-.;=_`{}~/",
- "base": null,
- "href": "sc://%01%02%03%04%05%06%07%08%0B%0C%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%7F!\"$%&'()*+,-.;=_`{}~/",
- "origin": "null",
- "protocol": "sc:",
- "username": "",
- "password": "",
- "host": "%01%02%03%04%05%06%07%08%0B%0C%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%7F!\"$%&'()*+,-.;=_`{}~",
- "hostname": "%01%02%03%04%05%06%07%08%0B%0C%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%7F!\"$%&'()*+,-.;=_`{}~",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- "# Hosts and percent-encoding",
- {
- "input": "ftp://example.com%80/",
- "base": null,
- "failure": true
- },
- {
- "input": "ftp://example.com%A0/",
- "base": null,
- "failure": true
- },
- {
- "input": "https://example.com%80/",
- "base": null,
- "failure": true
- },
- {
- "input": "https://example.com%A0/",
- "base": null,
- "failure": true
- },
- {
- "input": "ftp://%e2%98%83",
- "base": null,
- "href": "ftp://xn--n3h/",
- "origin": "ftp://xn--n3h",
- "protocol": "ftp:",
- "username": "",
- "password": "",
- "host": "xn--n3h",
- "hostname": "xn--n3h",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "https://%e2%98%83",
- "base": null,
- "href": "https://xn--n3h/",
- "origin": "https://xn--n3h",
- "protocol": "https:",
- "username": "",
- "password": "",
- "host": "xn--n3h",
- "hostname": "xn--n3h",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- "# tests from jsdom/whatwg-url designed for code coverage",
- {
- "input": "http://127.0.0.1:10100/relative_import.html",
- "base": null,
- "href": "http://127.0.0.1:10100/relative_import.html",
- "origin": "http://127.0.0.1:10100",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "127.0.0.1:10100",
- "hostname": "127.0.0.1",
- "port": "10100",
- "pathname": "/relative_import.html",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://facebook.com/?foo=%7B%22abc%22",
- "base": null,
- "href": "http://facebook.com/?foo=%7B%22abc%22",
- "origin": "http://facebook.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "facebook.com",
- "hostname": "facebook.com",
- "port": "",
- "pathname": "/",
- "search": "?foo=%7B%22abc%22",
- "hash": ""
- },
- {
- "input": "https://localhost:3000/jqueryui@1.2.3",
- "base": null,
- "href": "https://localhost:3000/jqueryui@1.2.3",
- "origin": "https://localhost:3000",
- "protocol": "https:",
- "username": "",
- "password": "",
- "host": "localhost:3000",
- "hostname": "localhost",
- "port": "3000",
- "pathname": "/jqueryui@1.2.3",
- "search": "",
- "hash": ""
- },
- "# tab/LF/CR",
- {
- "input": "h\tt\nt\rp://h\to\ns\rt:9\t0\n0\r0/p\ta\nt\rh?q\tu\ne\rry#f\tr\na\rg",
- "base": null,
- "href": "http://host:9000/path?query#frag",
- "origin": "http://host:9000",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "host:9000",
- "hostname": "host",
- "port": "9000",
- "pathname": "/path",
- "search": "?query",
- "hash": "#frag"
- },
- "# Stringification of URL.searchParams",
- {
- "input": "?a=b&c=d",
- "base": "http://example.org/foo/bar",
- "href": "http://example.org/foo/bar?a=b&c=d",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/foo/bar",
- "search": "?a=b&c=d",
- "searchParams": "a=b&c=d",
- "hash": ""
- },
- {
- "input": "??a=b&c=d",
- "base": "http://example.org/foo/bar",
- "href": "http://example.org/foo/bar??a=b&c=d",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/foo/bar",
- "search": "??a=b&c=d",
- "searchParams": "%3Fa=b&c=d",
- "hash": ""
- },
- "# Scheme only",
- {
- "input": "http:",
- "base": "http://example.org/foo/bar",
- "href": "http://example.org/foo/bar",
- "origin": "http://example.org",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/foo/bar",
- "search": "",
- "searchParams": "",
- "hash": ""
- },
- {
- "input": "http:",
- "base": "https://example.org/foo/bar",
- "failure": true
- },
- {
- "input": "sc:",
- "base": "https://example.org/foo/bar",
- "href": "sc:",
- "origin": "null",
- "protocol": "sc:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "",
- "search": "",
- "searchParams": "",
- "hash": ""
- },
- "# Percent encoding of fragments",
- {
- "input": "http://foo.bar/baz?qux#foo\bbar",
- "base": null,
- "href": "http://foo.bar/baz?qux#foo%08bar",
- "origin": "http://foo.bar",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "foo.bar",
- "hostname": "foo.bar",
- "port": "",
- "pathname": "/baz",
- "search": "?qux",
- "searchParams": "qux=",
- "hash": "#foo%08bar"
- },
- {
- "input": "http://foo.bar/baz?qux#foo\"bar",
- "base": null,
- "href": "http://foo.bar/baz?qux#foo%22bar",
- "origin": "http://foo.bar",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "foo.bar",
- "hostname": "foo.bar",
- "port": "",
- "pathname": "/baz",
- "search": "?qux",
- "searchParams": "qux=",
- "hash": "#foo%22bar"
- },
- {
- "input": "http://foo.bar/baz?qux#foo<bar",
- "base": null,
- "href": "http://foo.bar/baz?qux#foo%3Cbar",
- "origin": "http://foo.bar",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "foo.bar",
- "hostname": "foo.bar",
- "port": "",
- "pathname": "/baz",
- "search": "?qux",
- "searchParams": "qux=",
- "hash": "#foo%3Cbar"
- },
- {
- "input": "http://foo.bar/baz?qux#foo>bar",
- "base": null,
- "href": "http://foo.bar/baz?qux#foo%3Ebar",
- "origin": "http://foo.bar",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "foo.bar",
- "hostname": "foo.bar",
- "port": "",
- "pathname": "/baz",
- "search": "?qux",
- "searchParams": "qux=",
- "hash": "#foo%3Ebar"
- },
- {
- "input": "http://foo.bar/baz?qux#foo`bar",
- "base": null,
- "href": "http://foo.bar/baz?qux#foo%60bar",
- "origin": "http://foo.bar",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "foo.bar",
- "hostname": "foo.bar",
- "port": "",
- "pathname": "/baz",
- "search": "?qux",
- "searchParams": "qux=",
- "hash": "#foo%60bar"
- },
- "# IPv4 parsing (via https://github.com/nodejs/node/pull/10317)",
- {
- "input": "http://1.2.3.4/",
- "base": "http://other.com/",
- "href": "http://1.2.3.4/",
- "origin": "http://1.2.3.4",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "1.2.3.4",
- "hostname": "1.2.3.4",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://1.2.3.4./",
- "base": "http://other.com/",
- "href": "http://1.2.3.4/",
- "origin": "http://1.2.3.4",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "1.2.3.4",
- "hostname": "1.2.3.4",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://192.168.257",
- "base": "http://other.com/",
- "href": "http://192.168.1.1/",
- "origin": "http://192.168.1.1",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "192.168.1.1",
- "hostname": "192.168.1.1",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://192.168.257.",
- "base": "http://other.com/",
- "href": "http://192.168.1.1/",
- "origin": "http://192.168.1.1",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "192.168.1.1",
- "hostname": "192.168.1.1",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://192.168.257.com",
- "base": "http://other.com/",
- "href": "http://192.168.257.com/",
- "origin": "http://192.168.257.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "192.168.257.com",
- "hostname": "192.168.257.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://256",
- "base": "http://other.com/",
- "href": "http://0.0.1.0/",
- "origin": "http://0.0.1.0",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "0.0.1.0",
- "hostname": "0.0.1.0",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://256.com",
- "base": "http://other.com/",
- "href": "http://256.com/",
- "origin": "http://256.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "256.com",
- "hostname": "256.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://999999999",
- "base": "http://other.com/",
- "href": "http://59.154.201.255/",
- "origin": "http://59.154.201.255",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "59.154.201.255",
- "hostname": "59.154.201.255",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://999999999.",
- "base": "http://other.com/",
- "href": "http://59.154.201.255/",
- "origin": "http://59.154.201.255",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "59.154.201.255",
- "hostname": "59.154.201.255",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://999999999.com",
- "base": "http://other.com/",
- "href": "http://999999999.com/",
- "origin": "http://999999999.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "999999999.com",
- "hostname": "999999999.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://10000000000",
- "base": "http://other.com/",
- "failure": true
- },
- {
- "input": "http://10000000000.com",
- "base": "http://other.com/",
- "href": "http://10000000000.com/",
- "origin": "http://10000000000.com",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "10000000000.com",
- "hostname": "10000000000.com",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://4294967295",
- "base": "http://other.com/",
- "href": "http://255.255.255.255/",
- "origin": "http://255.255.255.255",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "255.255.255.255",
- "hostname": "255.255.255.255",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://4294967296",
- "base": "http://other.com/",
- "failure": true
- },
- {
- "input": "http://0xffffffff",
- "base": "http://other.com/",
- "href": "http://255.255.255.255/",
- "origin": "http://255.255.255.255",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "255.255.255.255",
- "hostname": "255.255.255.255",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://0xffffffff1",
- "base": "http://other.com/",
- "failure": true
- },
- {
- "input": "http://256.256.256.256",
- "base": "http://other.com/",
- "failure": true
- },
- {
- "input": "https://0x.0x.0",
- "base": null,
- "href": "https://0.0.0.0/",
- "origin": "https://0.0.0.0",
- "protocol": "https:",
- "username": "",
- "password": "",
- "host": "0.0.0.0",
- "hostname": "0.0.0.0",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- "More IPv4 parsing (via https://github.com/jsdom/whatwg-url/issues/92)",
- {
- "input": "https://0x100000000/test",
- "base": null,
- "failure": true
- },
- {
- "input": "https://256.0.0.1/test",
- "base": null,
- "failure": true
- },
- "# file URLs containing percent-encoded Windows drive letters (shouldn't work)",
- {
- "input": "file:///C%3A/",
- "base": null,
- "href": "file:///C%3A/",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/C%3A/",
- "search": "",
- "hash": ""
- },
- {
- "input": "file:///C%7C/",
- "base": null,
- "href": "file:///C%7C/",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/C%7C/",
- "search": "",
- "hash": ""
- },
- {
- "input": "file://%43%3A",
- "base": null,
- "failure": true
- },
- {
- "input": "file://%43%7C",
- "base": null,
- "failure": true
- },
- {
- "input": "file://%43|",
- "base": null,
- "failure": true
- },
- {
- "input": "file://C%7C",
- "base": null,
- "failure": true
- },
- {
- "input": "file://%43%7C/",
- "base": null,
- "failure": true
- },
- {
- "input": "https://%43%7C/",
- "base": null,
- "failure": true
- },
- {
- "input": "asdf://%43|/",
- "base": null,
- "failure": true
- },
- {
- "input": "asdf://%43%7C/",
- "base": null,
- "href": "asdf://%43%7C/",
- "origin": "null",
- "protocol": "asdf:",
- "username": "",
- "password": "",
- "host": "%43%7C",
- "hostname": "%43%7C",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- "# file URLs relative to other file URLs (via https://github.com/jsdom/whatwg-url/pull/60)",
- {
- "input": "pix/submit.gif",
- "base": "file:///C:/Users/Domenic/Dropbox/GitHub/tmpvar/jsdom/test/level2/html/files/anchor.html",
- "href": "file:///C:/Users/Domenic/Dropbox/GitHub/tmpvar/jsdom/test/level2/html/files/pix/submit.gif",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/C:/Users/Domenic/Dropbox/GitHub/tmpvar/jsdom/test/level2/html/files/pix/submit.gif",
- "search": "",
- "hash": ""
- },
- {
- "input": "..",
- "base": "file:///C:/",
- "href": "file:///C:/",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/C:/",
- "search": "",
- "hash": ""
- },
- {
- "input": "..",
- "base": "file:///",
- "href": "file:///",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- "# More file URL tests by zcorpan and annevk",
- {
- "input": "/",
- "base": "file:///C:/a/b",
- "href": "file:///C:/",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/C:/",
- "search": "",
- "hash": ""
- },
- {
- "input": "/",
- "base": "file://h/C:/a/b",
- "href": "file://h/C:/",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "h",
- "hostname": "h",
- "port": "",
- "pathname": "/C:/",
- "search": "",
- "hash": ""
- },
- {
- "input": "/",
- "base": "file://h/a/b",
- "href": "file://h/",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "h",
- "hostname": "h",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "//d:",
- "base": "file:///C:/a/b",
- "href": "file:///d:",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/d:",
- "search": "",
- "hash": ""
- },
- {
- "input": "//d:/..",
- "base": "file:///C:/a/b",
- "href": "file:///d:/",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/d:/",
- "search": "",
- "hash": ""
- },
- {
- "input": "..",
- "base": "file:///ab:/",
- "href": "file:///",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "..",
- "base": "file:///1:/",
- "href": "file:///",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "",
- "base": "file:///test?test#test",
- "href": "file:///test?test",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/test",
- "search": "?test",
- "hash": ""
- },
- {
- "input": "file:",
- "base": "file:///test?test#test",
- "href": "file:///test?test",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/test",
- "search": "?test",
- "hash": ""
- },
- {
- "input": "?x",
- "base": "file:///test?test#test",
- "href": "file:///test?x",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/test",
- "search": "?x",
- "hash": ""
- },
- {
- "input": "file:?x",
- "base": "file:///test?test#test",
- "href": "file:///test?x",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/test",
- "search": "?x",
- "hash": ""
- },
- {
- "input": "#x",
- "base": "file:///test?test#test",
- "href": "file:///test?test#x",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/test",
- "search": "?test",
- "hash": "#x"
- },
- {
- "input": "file:#x",
- "base": "file:///test?test#test",
- "href": "file:///test?test#x",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/test",
- "search": "?test",
- "hash": "#x"
- },
- "# File URLs and many (back)slashes",
- {
- "input": "file:\\\\//",
- "base": null,
- "href": "file:////",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "//",
- "search": "",
- "hash": ""
- },
- {
- "input": "file:\\\\\\\\",
- "base": null,
- "href": "file:////",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "//",
- "search": "",
- "hash": ""
- },
- {
- "input": "file:\\\\\\\\?fox",
- "base": null,
- "href": "file:////?fox",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "//",
- "search": "?fox",
- "hash": ""
- },
- {
- "input": "file:\\\\\\\\#guppy",
- "base": null,
- "href": "file:////#guppy",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "//",
- "search": "",
- "hash": "#guppy"
- },
- {
- "input": "file://spider///",
- "base": null,
- "href": "file://spider///",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "spider",
- "hostname": "spider",
- "port": "",
- "pathname": "///",
- "search": "",
- "hash": ""
- },
- {
- "input": "file:\\\\localhost//",
- "base": null,
- "href": "file:////",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "//",
- "search": "",
- "hash": ""
- },
- {
- "input": "file:///localhost//cat",
- "base": null,
- "href": "file:///localhost//cat",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/localhost//cat",
- "search": "",
- "hash": ""
- },
- {
- "input": "file://\\/localhost//cat",
- "base": null,
- "href": "file:////localhost//cat",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "//localhost//cat",
- "search": "",
- "hash": ""
- },
- {
- "input": "file://localhost//a//../..//",
- "base": null,
- "href": "file://///",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "///",
- "search": "",
- "hash": ""
- },
- {
- "input": "/////mouse",
- "base": "file:///elephant",
- "href": "file://///mouse",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "///mouse",
- "search": "",
- "hash": ""
- },
- {
- "input": "\\//pig",
- "base": "file://lion/",
- "href": "file:///pig",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/pig",
- "search": "",
- "hash": ""
- },
- {
- "input": "\\/localhost//pig",
- "base": "file://lion/",
- "href": "file:////pig",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "//pig",
- "search": "",
- "hash": ""
- },
- {
- "input": "//localhost//pig",
- "base": "file://lion/",
- "href": "file:////pig",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "//pig",
- "search": "",
- "hash": ""
- },
- {
- "input": "/..//localhost//pig",
- "base": "file://lion/",
- "href": "file://lion//localhost//pig",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "lion",
- "hostname": "lion",
- "port": "",
- "pathname": "//localhost//pig",
- "search": "",
- "hash": ""
- },
- {
- "input": "file://",
- "base": "file://ape/",
- "href": "file:///",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- "# File URLs with non-empty hosts",
- {
- "input": "/rooibos",
- "base": "file://tea/",
- "href": "file://tea/rooibos",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "tea",
- "hostname": "tea",
- "port": "",
- "pathname": "/rooibos",
- "search": "",
- "hash": ""
- },
- {
- "input": "/?chai",
- "base": "file://tea/",
- "href": "file://tea/?chai",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "tea",
- "hostname": "tea",
- "port": "",
- "pathname": "/",
- "search": "?chai",
- "hash": ""
- },
- "# Windows drive letter handling with the 'file:' base URL",
- {
- "input": "C|",
- "base": "file://host/dir/file",
- "href": "file://host/C:",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "host",
- "hostname": "host",
- "port": "",
- "pathname": "/C:",
- "search": "",
- "hash": ""
- },
- {
- "input": "C|",
- "base": "file://host/D:/dir1/dir2/file",
- "href": "file://host/C:",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "host",
- "hostname": "host",
- "port": "",
- "pathname": "/C:",
- "search": "",
- "hash": ""
- },
- {
- "input": "C|#",
- "base": "file://host/dir/file",
- "href": "file://host/C:#",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "host",
- "hostname": "host",
- "port": "",
- "pathname": "/C:",
- "search": "",
- "hash": ""
- },
- {
- "input": "C|?",
- "base": "file://host/dir/file",
- "href": "file://host/C:?",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "host",
- "hostname": "host",
- "port": "",
- "pathname": "/C:",
- "search": "",
- "hash": ""
- },
- {
- "input": "C|/",
- "base": "file://host/dir/file",
- "href": "file://host/C:/",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "host",
- "hostname": "host",
- "port": "",
- "pathname": "/C:/",
- "search": "",
- "hash": ""
- },
- {
- "input": "C|\n/",
- "base": "file://host/dir/file",
- "href": "file://host/C:/",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "host",
- "hostname": "host",
- "port": "",
- "pathname": "/C:/",
- "search": "",
- "hash": ""
- },
- {
- "input": "C|\\",
- "base": "file://host/dir/file",
- "href": "file://host/C:/",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "host",
- "hostname": "host",
- "port": "",
- "pathname": "/C:/",
- "search": "",
- "hash": ""
- },
- {
- "input": "C",
- "base": "file://host/dir/file",
- "href": "file://host/dir/C",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "host",
- "hostname": "host",
- "port": "",
- "pathname": "/dir/C",
- "search": "",
- "hash": ""
- },
- {
- "input": "C|a",
- "base": "file://host/dir/file",
- "href": "file://host/dir/C|a",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "host",
- "hostname": "host",
- "port": "",
- "pathname": "/dir/C|a",
- "search": "",
- "hash": ""
- },
- "# Windows drive letter quirk in the file slash state",
- {
- "input": "/c:/foo/bar",
- "base": "file:///c:/baz/qux",
- "href": "file:///c:/foo/bar",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/c:/foo/bar",
- "search": "",
- "hash": ""
- },
- {
- "input": "/c|/foo/bar",
- "base": "file:///c:/baz/qux",
- "href": "file:///c:/foo/bar",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/c:/foo/bar",
- "search": "",
- "hash": ""
- },
- {
- "input": "file:\\c:\\foo\\bar",
- "base": "file:///c:/baz/qux",
- "href": "file:///c:/foo/bar",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/c:/foo/bar",
- "search": "",
- "hash": ""
- },
- {
- "input": "/c:/foo/bar",
- "base": "file://host/path",
- "href": "file://host/c:/foo/bar",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "host",
- "hostname": "host",
- "port": "",
- "pathname": "/c:/foo/bar",
- "search": "",
- "hash": ""
- },
- "# Do not drop the host in the presence of a drive letter",
- {
- "input": "file://example.net/C:/",
- "base": null,
- "href": "file://example.net/C:/",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "example.net",
- "hostname": "example.net",
- "port": "",
- "pathname": "/C:/",
- "search": "",
- "hash": ""
- },
- {
- "input": "file://1.2.3.4/C:/",
- "base": null,
- "href": "file://1.2.3.4/C:/",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "1.2.3.4",
- "hostname": "1.2.3.4",
- "port": "",
- "pathname": "/C:/",
- "search": "",
- "hash": ""
- },
- {
- "input": "file://[1::8]/C:/",
- "base": null,
- "href": "file://[1::8]/C:/",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "[1::8]",
- "hostname": "[1::8]",
- "port": "",
- "pathname": "/C:/",
- "search": "",
- "hash": ""
- },
- "# Copy the host from the base URL in the following cases",
- {
- "input": "C|/",
- "base": "file://host/",
- "href": "file://host/C:/",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "host",
- "hostname": "host",
- "port": "",
- "pathname": "/C:/",
- "search": "",
- "hash": ""
- },
- {
- "input": "/C:/",
- "base": "file://host/",
- "href": "file://host/C:/",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "host",
- "hostname": "host",
- "port": "",
- "pathname": "/C:/",
- "search": "",
- "hash": ""
- },
- {
- "input": "file:C:/",
- "base": "file://host/",
- "href": "file://host/C:/",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "host",
- "hostname": "host",
- "port": "",
- "pathname": "/C:/",
- "search": "",
- "hash": ""
- },
- {
- "input": "file:/C:/",
- "base": "file://host/",
- "href": "file://host/C:/",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "host",
- "hostname": "host",
- "port": "",
- "pathname": "/C:/",
- "search": "",
- "hash": ""
- },
- "# Copy the empty host from the input in the following cases",
- {
- "input": "//C:/",
- "base": "file://host/",
- "href": "file:///C:/",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/C:/",
- "search": "",
- "hash": ""
- },
- {
- "input": "file://C:/",
- "base": "file://host/",
- "href": "file:///C:/",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/C:/",
- "search": "",
- "hash": ""
- },
- {
- "input": "///C:/",
- "base": "file://host/",
- "href": "file:///C:/",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/C:/",
- "search": "",
- "hash": ""
- },
- {
- "input": "file:///C:/",
- "base": "file://host/",
- "href": "file:///C:/",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/C:/",
- "search": "",
- "hash": ""
- },
- "# Windows drive letter quirk (no host)",
- {
- "input": "file:/C|/",
- "base": null,
- "href": "file:///C:/",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/C:/",
- "search": "",
- "hash": ""
- },
- {
- "input": "file://C|/",
- "base": null,
- "href": "file:///C:/",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/C:/",
- "search": "",
- "hash": ""
- },
- "# file URLs without base URL by Rimas Misevičius",
- {
- "input": "file:",
- "base": null,
- "href": "file:///",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "file:?q=v",
- "base": null,
- "href": "file:///?q=v",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/",
- "search": "?q=v",
- "hash": ""
- },
- {
- "input": "file:#frag",
- "base": null,
- "href": "file:///#frag",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": "#frag"
- },
- "# file: drive letter cases from https://crbug.com/1078698",
- {
- "input": "file:///Y:",
- "base": null,
- "href": "file:///Y:",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/Y:",
- "search": "",
- "hash": ""
- },
- {
- "input": "file:///Y:/",
- "base": null,
- "href": "file:///Y:/",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/Y:/",
- "search": "",
- "hash": ""
- },
- {
- "input": "file:///./Y",
- "base": null,
- "href": "file:///Y",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/Y",
- "search": "",
- "hash": ""
- },
- {
- "input": "file:///./Y:",
- "base": null,
- "href": "file:///Y:",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/Y:",
- "search": "",
- "hash": ""
- },
- {
- "input": "\\\\\\.\\Y:",
- "base": null,
- "failure": true,
- "relativeTo": "non-opaque-path-base"
- },
- "# file: drive letter cases from https://crbug.com/1078698 but lowercased",
- {
- "input": "file:///y:",
- "base": null,
- "href": "file:///y:",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/y:",
- "search": "",
- "hash": ""
- },
- {
- "input": "file:///y:/",
- "base": null,
- "href": "file:///y:/",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/y:/",
- "search": "",
- "hash": ""
- },
- {
- "input": "file:///./y",
- "base": null,
- "href": "file:///y",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/y",
- "search": "",
- "hash": ""
- },
- {
- "input": "file:///./y:",
- "base": null,
- "href": "file:///y:",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/y:",
- "search": "",
- "hash": ""
- },
- {
- "input": "\\\\\\.\\y:",
- "base": null,
- "failure": true,
- "relativeTo": "non-opaque-path-base"
- },
- "# Additional file URL tests for (https://github.com/whatwg/url/issues/405)",
- {
- "input": "file://localhost//a//../..//foo",
- "base": null,
- "href": "file://///foo",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "///foo",
- "search": "",
- "hash": ""
- },
- {
- "input": "file://localhost////foo",
- "base": null,
- "href": "file://////foo",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "////foo",
- "search": "",
- "hash": ""
- },
- {
- "input": "file:////foo",
- "base": null,
- "href": "file:////foo",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "//foo",
- "search": "",
- "hash": ""
- },
- {
- "input": "file:///one/two",
- "base": "file:///",
- "href": "file:///one/two",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/one/two",
- "search": "",
- "hash": ""
- },
- {
- "input": "file:////one/two",
- "base": "file:///",
- "href": "file:////one/two",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "//one/two",
- "search": "",
- "hash": ""
- },
- {
- "input": "//one/two",
- "base": "file:///",
- "href": "file://one/two",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "one",
- "hostname": "one",
- "port": "",
- "pathname": "/two",
- "search": "",
- "hash": ""
- },
- {
- "input": "///one/two",
- "base": "file:///",
- "href": "file:///one/two",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/one/two",
- "search": "",
- "hash": ""
- },
- {
- "input": "////one/two",
- "base": "file:///",
- "href": "file:////one/two",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "//one/two",
- "search": "",
- "hash": ""
- },
- {
- "input": "file:///.//",
- "base": "file:////",
- "href": "file:////",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "//",
- "search": "",
- "hash": ""
- },
- "File URL tests for https://github.com/whatwg/url/issues/549",
- {
- "input": "file:.//p",
- "base": null,
- "href": "file:////p",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "//p",
- "search": "",
- "hash": ""
- },
- {
- "input": "file:/.//p",
- "base": null,
- "href": "file:////p",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "//p",
- "search": "",
- "hash": ""
- },
- "# IPv6 tests",
- {
- "input": "http://[1:0::]",
- "base": "http://example.net/",
- "href": "http://[1::]/",
- "origin": "http://[1::]",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "[1::]",
- "hostname": "[1::]",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://[0:1:2:3:4:5:6:7:8]",
- "base": "http://example.net/",
- "failure": true
- },
- {
- "input": "https://[0::0::0]",
- "base": null,
- "failure": true
- },
- {
- "input": "https://[0:.0]",
- "base": null,
- "failure": true
- },
- {
- "input": "https://[0:0:]",
- "base": null,
- "failure": true
- },
- {
- "input": "https://[0:1:2:3:4:5:6:7.0.0.0.1]",
- "base": null,
- "failure": true
- },
- {
- "input": "https://[0:1.00.0.0.0]",
- "base": null,
- "failure": true
- },
- {
- "input": "https://[0:1.290.0.0.0]",
- "base": null,
- "failure": true
- },
- {
- "input": "https://[0:1.23.23]",
- "base": null,
- "failure": true
- },
- "# Empty host",
- {
- "input": "http://?",
- "base": null,
- "failure": true
- },
- {
- "input": "http://#",
- "base": null,
- "failure": true
- },
- "Port overflow (2^32 + 81)",
- {
- "input": "http://f:4294967377/c",
- "base": "http://example.org/",
- "failure": true
- },
- "Port overflow (2^64 + 81)",
- {
- "input": "http://f:18446744073709551697/c",
- "base": "http://example.org/",
- "failure": true
- },
- "Port overflow (2^128 + 81)",
- {
- "input": "http://f:340282366920938463463374607431768211537/c",
- "base": "http://example.org/",
- "failure": true
- },
- "# Non-special-URL path tests",
- {
- "input": "sc://ñ",
- "base": null,
- "href": "sc://%C3%B1",
- "origin": "null",
- "protocol": "sc:",
- "username": "",
- "password": "",
- "host": "%C3%B1",
- "hostname": "%C3%B1",
- "port": "",
- "pathname": "",
- "search": "",
- "hash": ""
- },
- {
- "input": "sc://ñ?x",
- "base": null,
- "href": "sc://%C3%B1?x",
- "origin": "null",
- "protocol": "sc:",
- "username": "",
- "password": "",
- "host": "%C3%B1",
- "hostname": "%C3%B1",
- "port": "",
- "pathname": "",
- "search": "?x",
- "hash": ""
- },
- {
- "input": "sc://ñ#x",
- "base": null,
- "href": "sc://%C3%B1#x",
- "origin": "null",
- "protocol": "sc:",
- "username": "",
- "password": "",
- "host": "%C3%B1",
- "hostname": "%C3%B1",
- "port": "",
- "pathname": "",
- "search": "",
- "hash": "#x"
- },
- {
- "input": "#x",
- "base": "sc://ñ",
- "href": "sc://%C3%B1#x",
- "origin": "null",
- "protocol": "sc:",
- "username": "",
- "password": "",
- "host": "%C3%B1",
- "hostname": "%C3%B1",
- "port": "",
- "pathname": "",
- "search": "",
- "hash": "#x"
- },
- {
- "input": "?x",
- "base": "sc://ñ",
- "href": "sc://%C3%B1?x",
- "origin": "null",
- "protocol": "sc:",
- "username": "",
- "password": "",
- "host": "%C3%B1",
- "hostname": "%C3%B1",
- "port": "",
- "pathname": "",
- "search": "?x",
- "hash": ""
- },
- {
- "input": "sc://?",
- "base": null,
- "href": "sc://?",
- "protocol": "sc:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "",
- "search": "",
- "hash": ""
- },
- {
- "input": "sc://#",
- "base": null,
- "href": "sc://#",
- "protocol": "sc:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "",
- "search": "",
- "hash": ""
- },
- {
- "input": "///",
- "base": "sc://x/",
- "href": "sc:///",
- "protocol": "sc:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "////",
- "base": "sc://x/",
- "href": "sc:////",
- "protocol": "sc:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "//",
- "search": "",
- "hash": ""
- },
- {
- "input": "////x/",
- "base": "sc://x/",
- "href": "sc:////x/",
- "protocol": "sc:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "//x/",
- "search": "",
- "hash": ""
- },
- {
- "input": "tftp://foobar.com/someconfig;mode=netascii",
- "base": null,
- "href": "tftp://foobar.com/someconfig;mode=netascii",
- "origin": "null",
- "protocol": "tftp:",
- "username": "",
- "password": "",
- "host": "foobar.com",
- "hostname": "foobar.com",
- "port": "",
- "pathname": "/someconfig;mode=netascii",
- "search": "",
- "hash": ""
- },
- {
- "input": "telnet://user:pass@foobar.com:23/",
- "base": null,
- "href": "telnet://user:pass@foobar.com:23/",
- "origin": "null",
- "protocol": "telnet:",
- "username": "user",
- "password": "pass",
- "host": "foobar.com:23",
- "hostname": "foobar.com",
- "port": "23",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "ut2004://10.10.10.10:7777/Index.ut2",
- "base": null,
- "href": "ut2004://10.10.10.10:7777/Index.ut2",
- "origin": "null",
- "protocol": "ut2004:",
- "username": "",
- "password": "",
- "host": "10.10.10.10:7777",
- "hostname": "10.10.10.10",
- "port": "7777",
- "pathname": "/Index.ut2",
- "search": "",
- "hash": ""
- },
- {
- "input": "redis://foo:bar@somehost:6379/0?baz=bam&qux=baz",
- "base": null,
- "href": "redis://foo:bar@somehost:6379/0?baz=bam&qux=baz",
- "origin": "null",
- "protocol": "redis:",
- "username": "foo",
- "password": "bar",
- "host": "somehost:6379",
- "hostname": "somehost",
- "port": "6379",
- "pathname": "/0",
- "search": "?baz=bam&qux=baz",
- "hash": ""
- },
- {
- "input": "rsync://foo@host:911/sup",
- "base": null,
- "href": "rsync://foo@host:911/sup",
- "origin": "null",
- "protocol": "rsync:",
- "username": "foo",
- "password": "",
- "host": "host:911",
- "hostname": "host",
- "port": "911",
- "pathname": "/sup",
- "search": "",
- "hash": ""
- },
- {
- "input": "git://github.com/foo/bar.git",
- "base": null,
- "href": "git://github.com/foo/bar.git",
- "origin": "null",
- "protocol": "git:",
- "username": "",
- "password": "",
- "host": "github.com",
- "hostname": "github.com",
- "port": "",
- "pathname": "/foo/bar.git",
- "search": "",
- "hash": ""
- },
- {
- "input": "irc://myserver.com:6999/channel?passwd",
- "base": null,
- "href": "irc://myserver.com:6999/channel?passwd",
- "origin": "null",
- "protocol": "irc:",
- "username": "",
- "password": "",
- "host": "myserver.com:6999",
- "hostname": "myserver.com",
- "port": "6999",
- "pathname": "/channel",
- "search": "?passwd",
- "hash": ""
- },
- {
- "input": "dns://fw.example.org:9999/foo.bar.org?type=TXT",
- "base": null,
- "href": "dns://fw.example.org:9999/foo.bar.org?type=TXT",
- "origin": "null",
- "protocol": "dns:",
- "username": "",
- "password": "",
- "host": "fw.example.org:9999",
- "hostname": "fw.example.org",
- "port": "9999",
- "pathname": "/foo.bar.org",
- "search": "?type=TXT",
- "hash": ""
- },
- {
- "input": "ldap://localhost:389/ou=People,o=JNDITutorial",
- "base": null,
- "href": "ldap://localhost:389/ou=People,o=JNDITutorial",
- "origin": "null",
- "protocol": "ldap:",
- "username": "",
- "password": "",
- "host": "localhost:389",
- "hostname": "localhost",
- "port": "389",
- "pathname": "/ou=People,o=JNDITutorial",
- "search": "",
- "hash": ""
- },
- {
- "input": "git+https://github.com/foo/bar",
- "base": null,
- "href": "git+https://github.com/foo/bar",
- "origin": "null",
- "protocol": "git+https:",
- "username": "",
- "password": "",
- "host": "github.com",
- "hostname": "github.com",
- "port": "",
- "pathname": "/foo/bar",
- "search": "",
- "hash": ""
- },
- {
- "input": "urn:ietf:rfc:2648",
- "base": null,
- "href": "urn:ietf:rfc:2648",
- "origin": "null",
- "protocol": "urn:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "ietf:rfc:2648",
- "search": "",
- "hash": ""
- },
- {
- "input": "tag:joe@example.org,2001:foo/bar",
- "base": null,
- "href": "tag:joe@example.org,2001:foo/bar",
- "origin": "null",
- "protocol": "tag:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "joe@example.org,2001:foo/bar",
- "search": "",
- "hash": ""
- },
- "Serialize /. in path",
- {
- "input": "non-spec:/.//",
- "base": null,
- "href": "non-spec:/.//",
- "protocol": "non-spec:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "//",
- "search": "",
- "hash": ""
- },
- {
- "input": "non-spec:/..//",
- "base": null,
- "href": "non-spec:/.//",
- "protocol": "non-spec:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "//",
- "search": "",
- "hash": ""
- },
- {
- "input": "non-spec:/a/..//",
- "base": null,
- "href": "non-spec:/.//",
- "protocol": "non-spec:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "//",
- "search": "",
- "hash": ""
- },
- {
- "input": "non-spec:/.//path",
- "base": null,
- "href": "non-spec:/.//path",
- "protocol": "non-spec:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "//path",
- "search": "",
- "hash": ""
- },
- {
- "input": "non-spec:/..//path",
- "base": null,
- "href": "non-spec:/.//path",
- "protocol": "non-spec:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "//path",
- "search": "",
- "hash": ""
- },
- {
- "input": "non-spec:/a/..//path",
- "base": null,
- "href": "non-spec:/.//path",
- "protocol": "non-spec:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "//path",
- "search": "",
- "hash": ""
- },
- {
- "input": "/.//path",
- "base": "non-spec:/p",
- "href": "non-spec:/.//path",
- "protocol": "non-spec:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "//path",
- "search": "",
- "hash": ""
- },
- {
- "input": "/..//path",
- "base": "non-spec:/p",
- "href": "non-spec:/.//path",
- "protocol": "non-spec:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "//path",
- "search": "",
- "hash": ""
- },
- {
- "input": "..//path",
- "base": "non-spec:/p",
- "href": "non-spec:/.//path",
- "protocol": "non-spec:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "//path",
- "search": "",
- "hash": ""
- },
- {
- "input": "a/..//path",
- "base": "non-spec:/p",
- "href": "non-spec:/.//path",
- "protocol": "non-spec:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "//path",
- "search": "",
- "hash": ""
- },
- {
- "input": "",
- "base": "non-spec:/..//p",
- "href": "non-spec:/.//p",
- "protocol": "non-spec:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "//p",
- "search": "",
- "hash": ""
- },
- {
- "input": "path",
- "base": "non-spec:/..//p",
- "href": "non-spec:/.//path",
- "protocol": "non-spec:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "//path",
- "search": "",
- "hash": ""
- },
- "Do not serialize /. in path",
- {
- "input": "../path",
- "base": "non-spec:/.//p",
- "href": "non-spec:/path",
- "protocol": "non-spec:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/path",
- "search": "",
- "hash": ""
- },
- "# percent encoded hosts in non-special-URLs",
- {
- "input": "non-special://%E2%80%A0/",
- "base": null,
- "href": "non-special://%E2%80%A0/",
- "protocol": "non-special:",
- "username": "",
- "password": "",
- "host": "%E2%80%A0",
- "hostname": "%E2%80%A0",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "non-special://H%4fSt/path",
- "base": null,
- "href": "non-special://H%4fSt/path",
- "protocol": "non-special:",
- "username": "",
- "password": "",
- "host": "H%4fSt",
- "hostname": "H%4fSt",
- "port": "",
- "pathname": "/path",
- "search": "",
- "hash": ""
- },
- "# IPv6 in non-special-URLs",
- {
- "input": "non-special://[1:2:0:0:5:0:0:0]/",
- "base": null,
- "href": "non-special://[1:2:0:0:5::]/",
- "protocol": "non-special:",
- "username": "",
- "password": "",
- "host": "[1:2:0:0:5::]",
- "hostname": "[1:2:0:0:5::]",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "non-special://[1:2:0:0:0:0:0:3]/",
- "base": null,
- "href": "non-special://[1:2::3]/",
- "protocol": "non-special:",
- "username": "",
- "password": "",
- "host": "[1:2::3]",
- "hostname": "[1:2::3]",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "non-special://[1:2::3]:80/",
- "base": null,
- "href": "non-special://[1:2::3]:80/",
- "protocol": "non-special:",
- "username": "",
- "password": "",
- "host": "[1:2::3]:80",
- "hostname": "[1:2::3]",
- "port": "80",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "non-special://[:80/",
- "base": null,
- "failure": true
- },
- {
- "input": "blob:https://example.com:443/",
- "base": null,
- "href": "blob:https://example.com:443/",
- "origin": "https://example.com",
- "protocol": "blob:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "https://example.com:443/",
- "search": "",
- "hash": ""
- },
- {
- "input": "blob:http://example.org:88/",
- "base": null,
- "href": "blob:http://example.org:88/",
- "origin": "http://example.org:88",
- "protocol": "blob:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "http://example.org:88/",
- "search": "",
- "hash": ""
- },
- {
- "input": "blob:d3958f5c-0777-0845-9dcf-2cb28783acaf",
- "base": null,
- "href": "blob:d3958f5c-0777-0845-9dcf-2cb28783acaf",
- "origin": "null",
- "protocol": "blob:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "d3958f5c-0777-0845-9dcf-2cb28783acaf",
- "search": "",
- "hash": ""
- },
- {
- "input": "blob:",
- "base": null,
- "href": "blob:",
- "origin": "null",
- "protocol": "blob:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "",
- "search": "",
- "hash": ""
- },
- "blob: in blob:",
- {
- "input": "blob:blob:",
- "base": null,
- "href": "blob:blob:",
- "origin": "null",
- "protocol": "blob:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "blob:",
- "search": "",
- "hash": ""
- },
- {
- "input": "blob:blob:https://example.org/",
- "base": null,
- "href": "blob:blob:https://example.org/",
- "origin": "null",
- "protocol": "blob:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "blob:https://example.org/",
- "search": "",
- "hash": ""
- },
- "Non-http(s): in blob:",
- {
- "input": "blob:about:blank",
- "base": null,
- "href": "blob:about:blank",
- "origin": "null",
- "protocol": "blob:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "about:blank",
- "search": "",
- "hash": ""
- },
- {
- "input": "blob:file://host/path",
- "base": null,
- "href": "blob:file://host/path",
- "protocol": "blob:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "file://host/path",
- "search": "",
- "hash": ""
- },
- {
- "input": "blob:ftp://host/path",
- "base": null,
- "href": "blob:ftp://host/path",
- "origin": "null",
- "protocol": "blob:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "ftp://host/path",
- "search": "",
- "hash": ""
- },
- {
- "input": "blob:ws://example.org/",
- "base": null,
- "href": "blob:ws://example.org/",
- "origin": "null",
- "protocol": "blob:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "ws://example.org/",
- "search": "",
- "hash": ""
- },
- {
- "input": "blob:wss://example.org/",
- "base": null,
- "href": "blob:wss://example.org/",
- "origin": "null",
- "protocol": "blob:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "wss://example.org/",
- "search": "",
- "hash": ""
- },
- "Percent-encoded http: in blob:",
- {
- "input": "blob:http%3a//example.org/",
- "base": null,
- "href": "blob:http%3a//example.org/",
- "origin": "null",
- "protocol": "blob:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "http%3a//example.org/",
- "search": "",
- "hash": ""
- },
- "Invalid IPv4 radix digits",
- {
- "input": "http://0x7f.0.0.0x7g",
- "base": null,
- "href": "http://0x7f.0.0.0x7g/",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "0x7f.0.0.0x7g",
- "hostname": "0x7f.0.0.0x7g",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://0X7F.0.0.0X7G",
- "base": null,
- "href": "http://0x7f.0.0.0x7g/",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "0x7f.0.0.0x7g",
- "hostname": "0x7f.0.0.0x7g",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- "Invalid IPv4 portion of IPv6 address",
- {
- "input": "http://[::127.0.0.0.1]",
- "base": null,
- "failure": true
- },
- "Uncompressed IPv6 addresses with 0",
- {
- "input": "http://[0:1:0:1:0:1:0:1]",
- "base": null,
- "href": "http://[0:1:0:1:0:1:0:1]/",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "[0:1:0:1:0:1:0:1]",
- "hostname": "[0:1:0:1:0:1:0:1]",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://[1:0:1:0:1:0:1:0]",
- "base": null,
- "href": "http://[1:0:1:0:1:0:1:0]/",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "[1:0:1:0:1:0:1:0]",
- "hostname": "[1:0:1:0:1:0:1:0]",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- "Percent-encoded query and fragment",
- {
- "input": "http://example.org/test?\u0022",
- "base": null,
- "href": "http://example.org/test?%22",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/test",
- "search": "?%22",
- "hash": ""
- },
- {
- "input": "http://example.org/test?\u0023",
- "base": null,
- "href": "http://example.org/test?#",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/test",
- "search": "",
- "hash": ""
- },
- {
- "input": "http://example.org/test?\u003C",
- "base": null,
- "href": "http://example.org/test?%3C",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/test",
- "search": "?%3C",
- "hash": ""
- },
- {
- "input": "http://example.org/test?\u003E",
- "base": null,
- "href": "http://example.org/test?%3E",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/test",
- "search": "?%3E",
- "hash": ""
- },
- {
- "input": "http://example.org/test?\u2323",
- "base": null,
- "href": "http://example.org/test?%E2%8C%A3",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/test",
- "search": "?%E2%8C%A3",
- "hash": ""
- },
- {
- "input": "http://example.org/test?%23%23",
- "base": null,
- "href": "http://example.org/test?%23%23",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/test",
- "search": "?%23%23",
- "hash": ""
- },
- {
- "input": "http://example.org/test?%GH",
- "base": null,
- "href": "http://example.org/test?%GH",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/test",
- "search": "?%GH",
- "hash": ""
- },
- {
- "input": "http://example.org/test?a#%EF",
- "base": null,
- "href": "http://example.org/test?a#%EF",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/test",
- "search": "?a",
- "hash": "#%EF"
- },
- {
- "input": "http://example.org/test?a#%GH",
- "base": null,
- "href": "http://example.org/test?a#%GH",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/test",
- "search": "?a",
- "hash": "#%GH"
- },
- "URLs that require a non-about:blank base. (Also serve as invalid base tests.)",
- {
- "input": "a",
- "base": null,
- "failure": true,
- "relativeTo": "non-opaque-path-base"
- },
- {
- "input": "a/",
- "base": null,
- "failure": true,
- "relativeTo": "non-opaque-path-base"
- },
- {
- "input": "a//",
- "base": null,
- "failure": true,
- "relativeTo": "non-opaque-path-base"
- },
- "Bases that don't fail to parse but fail to be bases",
- {
- "input": "test-a-colon.html",
- "base": "a:",
- "failure": true
- },
- {
- "input": "test-a-colon-b.html",
- "base": "a:b",
- "failure": true
- },
- "Other base URL tests, that must succeed",
- {
- "input": "test-a-colon-slash.html",
- "base": "a:/",
- "href": "a:/test-a-colon-slash.html",
- "protocol": "a:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/test-a-colon-slash.html",
- "search": "",
- "hash": ""
- },
- {
- "input": "test-a-colon-slash-slash.html",
- "base": "a://",
- "href": "a:///test-a-colon-slash-slash.html",
- "protocol": "a:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/test-a-colon-slash-slash.html",
- "search": "",
- "hash": ""
- },
- {
- "input": "test-a-colon-slash-b.html",
- "base": "a:/b",
- "href": "a:/test-a-colon-slash-b.html",
- "protocol": "a:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/test-a-colon-slash-b.html",
- "search": "",
- "hash": ""
- },
- {
- "input": "test-a-colon-slash-slash-b.html",
- "base": "a://b",
- "href": "a://b/test-a-colon-slash-slash-b.html",
- "protocol": "a:",
- "username": "",
- "password": "",
- "host": "b",
- "hostname": "b",
- "port": "",
- "pathname": "/test-a-colon-slash-slash-b.html",
- "search": "",
- "hash": ""
- },
- "Null code point in fragment",
- {
- "input": "http://example.org/test?a#b\u0000c",
- "base": null,
- "href": "http://example.org/test?a#b%00c",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/test",
- "search": "?a",
- "hash": "#b%00c"
- },
- {
- "input": "non-spec://example.org/test?a#b\u0000c",
- "base": null,
- "href": "non-spec://example.org/test?a#b%00c",
- "protocol": "non-spec:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/test",
- "search": "?a",
- "hash": "#b%00c"
- },
- {
- "input": "non-spec:/test?a#b\u0000c",
- "base": null,
- "href": "non-spec:/test?a#b%00c",
- "protocol": "non-spec:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/test",
- "search": "?a",
- "hash": "#b%00c"
- },
- "First scheme char - not allowed: https://github.com/whatwg/url/issues/464",
- {
- "input": "10.0.0.7:8080/foo.html",
- "base": "file:///some/dir/bar.html",
- "href": "file:///some/dir/10.0.0.7:8080/foo.html",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/some/dir/10.0.0.7:8080/foo.html",
- "search": "",
- "hash": ""
- },
- "Subsequent scheme chars - not allowed",
- {
- "input": "a!@$*=/foo.html",
- "base": "file:///some/dir/bar.html",
- "href": "file:///some/dir/a!@$*=/foo.html",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/some/dir/a!@$*=/foo.html",
- "search": "",
- "hash": ""
- },
- "First and subsequent scheme chars - allowed",
- {
- "input": "a1234567890-+.:foo/bar",
- "base": "http://example.com/dir/file",
- "href": "a1234567890-+.:foo/bar",
- "protocol": "a1234567890-+.:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "foo/bar",
- "search": "",
- "hash": ""
- },
- "IDNA ignored code points in file URLs hosts",
- {
- "input": "file://a\u00ADb/p",
- "base": null,
- "href": "file://ab/p",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "ab",
- "hostname": "ab",
- "port": "",
- "pathname": "/p",
- "search": "",
- "hash": ""
- },
- {
- "input": "file://a%C2%ADb/p",
- "base": null,
- "href": "file://ab/p",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "ab",
- "hostname": "ab",
- "port": "",
- "pathname": "/p",
- "search": "",
- "hash": ""
- },
- "IDNA hostnames which get mapped to 'localhost'",
- {
- "input": "file://loC𝐀𝐋𝐇𝐨𝐬𝐭/usr/bin",
- "base": null,
- "href": "file:///usr/bin",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/usr/bin",
- "search": "",
- "hash": ""
- },
- "Empty host after the domain to ASCII",
- {
- "input": "file://\u00ad/p",
- "base": null,
- "failure": true
- },
- {
- "input": "file://%C2%AD/p",
- "base": null,
- "failure": true
- },
- {
- "input": "file://xn--/p",
- "base": null,
- "failure": true
- },
- "https://bugzilla.mozilla.org/show_bug.cgi?id=1647058",
- {
- "input": "#link",
- "base": "https://example.org/##link",
- "href": "https://example.org/#link",
- "protocol": "https:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": "#link"
- },
- "UTF-8 percent-encode of C0 control percent-encode set and supersets",
- {
- "input": "non-special:cannot-be-a-base-url-\u0000\u0001\u001F\u001E\u007E\u007F\u0080",
- "base": null,
- "hash": "",
- "host": "",
- "hostname": "",
- "href": "non-special:cannot-be-a-base-url-%00%01%1F%1E~%7F%C2%80",
- "origin": "null",
- "password": "",
- "pathname": "cannot-be-a-base-url-%00%01%1F%1E~%7F%C2%80",
- "port": "",
- "protocol": "non-special:",
- "search": "",
- "username": ""
- },
- {
- "input": "non-special:cannot-be-a-base-url-!\"$%&'()*+,-.;<=>@[\\]^_`{|}~@/",
- "base": null,
- "hash": "",
- "host": "",
- "hostname": "",
- "href": "non-special:cannot-be-a-base-url-!\"$%&'()*+,-.;<=>@[\\]^_`{|}~@/",
- "origin": "null",
- "password": "",
- "pathname": "cannot-be-a-base-url-!\"$%&'()*+,-.;<=>@[\\]^_`{|}~@/",
- "port": "",
- "protocol": "non-special:",
- "search": "",
- "username": ""
- },
- {
- "input": "https://www.example.com/path{\u007Fpath.html?query'\u007F=query#fragment<\u007Ffragment",
- "base": null,
- "hash": "#fragment%3C%7Ffragment",
- "host": "www.example.com",
- "hostname": "www.example.com",
- "href": "https://www.example.com/path%7B%7Fpath.html?query%27%7F=query#fragment%3C%7Ffragment",
- "origin": "https://www.example.com",
- "password": "",
- "pathname": "/path%7B%7Fpath.html",
- "port": "",
- "protocol": "https:",
- "search": "?query%27%7F=query",
- "username": ""
- },
- {
- "input": "https://user:pass[\u007F@foo/bar",
- "base": "http://example.org",
- "hash": "",
- "host": "foo",
- "hostname": "foo",
- "href": "https://user:pass%5B%7F@foo/bar",
- "origin": "https://foo",
- "password": "pass%5B%7F",
- "pathname": "/bar",
- "port": "",
- "protocol": "https:",
- "search": "",
- "username": "user"
- },
- "Tests for the distinct percent-encode sets",
- {
- "input": "foo:// !\"$%&'()*+,-.;<=>@[\\]^_`{|}~@host/",
- "base": null,
- "hash": "",
- "host": "host",
- "hostname": "host",
- "href": "foo://%20!%22$%&'()*+,-.%3B%3C%3D%3E%40%5B%5C%5D%5E_%60%7B%7C%7D~@host/",
- "origin": "null",
- "password": "",
- "pathname": "/",
- "port":"",
- "protocol": "foo:",
- "search": "",
- "username": "%20!%22$%&'()*+,-.%3B%3C%3D%3E%40%5B%5C%5D%5E_%60%7B%7C%7D~"
- },
- {
- "input": "wss:// !\"$%&'()*+,-.;<=>@[]^_`{|}~@host/",
- "base": null,
- "hash": "",
- "host": "host",
- "hostname": "host",
- "href": "wss://%20!%22$%&'()*+,-.%3B%3C%3D%3E%40%5B%5D%5E_%60%7B%7C%7D~@host/",
- "origin": "wss://host",
- "password": "",
- "pathname": "/",
- "port":"",
- "protocol": "wss:",
- "search": "",
- "username": "%20!%22$%&'()*+,-.%3B%3C%3D%3E%40%5B%5D%5E_%60%7B%7C%7D~"
- },
- {
- "input": "foo://joe: !\"$%&'()*+,-.:;<=>@[\\]^_`{|}~@host/",
- "base": null,
- "hash": "",
- "host": "host",
- "hostname": "host",
- "href": "foo://joe:%20!%22$%&'()*+,-.%3A%3B%3C%3D%3E%40%5B%5C%5D%5E_%60%7B%7C%7D~@host/",
- "origin": "null",
- "password": "%20!%22$%&'()*+,-.%3A%3B%3C%3D%3E%40%5B%5C%5D%5E_%60%7B%7C%7D~",
- "pathname": "/",
- "port":"",
- "protocol": "foo:",
- "search": "",
- "username": "joe"
- },
- {
- "input": "wss://joe: !\"$%&'()*+,-.:;<=>@[]^_`{|}~@host/",
- "base": null,
- "hash": "",
- "host": "host",
- "hostname": "host",
- "href": "wss://joe:%20!%22$%&'()*+,-.%3A%3B%3C%3D%3E%40%5B%5D%5E_%60%7B%7C%7D~@host/",
- "origin": "wss://host",
- "password": "%20!%22$%&'()*+,-.%3A%3B%3C%3D%3E%40%5B%5D%5E_%60%7B%7C%7D~",
- "pathname": "/",
- "port":"",
- "protocol": "wss:",
- "search": "",
- "username": "joe"
- },
- {
- "input": "foo://!\"$%&'()*+,-.;=_`{}~/",
- "base": null,
- "hash": "",
- "host": "!\"$%&'()*+,-.;=_`{}~",
- "hostname": "!\"$%&'()*+,-.;=_`{}~",
- "href":"foo://!\"$%&'()*+,-.;=_`{}~/",
- "origin": "null",
- "password": "",
- "pathname": "/",
- "port":"",
- "protocol": "foo:",
- "search": "",
- "username": ""
- },
- {
- "input": "wss://!\"$&'()*+,-.;=_`{}~/",
- "base": null,
- "hash": "",
- "host": "!\"$&'()*+,-.;=_`{}~",
- "hostname": "!\"$&'()*+,-.;=_`{}~",
- "href":"wss://!\"$&'()*+,-.;=_`{}~/",
- "origin": "wss://!\"$&'()*+,-.;=_`{}~",
- "password": "",
- "pathname": "/",
- "port":"",
- "protocol": "wss:",
- "search": "",
- "username": ""
- },
- {
- "input": "foo://host/ !\"$%&'()*+,-./:;<=>@[\\]^_`{|}~",
- "base": null,
- "hash": "",
- "host": "host",
- "hostname": "host",
- "href": "foo://host/%20!%22$%&'()*+,-./:;%3C=%3E@[\\]%5E_%60%7B|%7D~",
- "origin": "null",
- "password": "",
- "pathname": "/%20!%22$%&'()*+,-./:;%3C=%3E@[\\]%5E_%60%7B|%7D~",
- "port":"",
- "protocol": "foo:",
- "search": "",
- "username": ""
- },
- {
- "input": "wss://host/ !\"$%&'()*+,-./:;<=>@[\\]^_`{|}~",
- "base": null,
- "hash": "",
- "host": "host",
- "hostname": "host",
- "href": "wss://host/%20!%22$%&'()*+,-./:;%3C=%3E@[/]%5E_%60%7B|%7D~",
- "origin": "wss://host",
- "password": "",
- "pathname": "/%20!%22$%&'()*+,-./:;%3C=%3E@[/]%5E_%60%7B|%7D~",
- "port":"",
- "protocol": "wss:",
- "search": "",
- "username": ""
- },
- {
- "input": "foo://host/dir/? !\"$%&'()*+,-./:;<=>?@[\\]^_`{|}~",
- "base": null,
- "hash": "",
- "host": "host",
- "hostname": "host",
- "href": "foo://host/dir/?%20!%22$%&'()*+,-./:;%3C=%3E?@[\\]^_`{|}~",
- "origin": "null",
- "password": "",
- "pathname": "/dir/",
- "port":"",
- "protocol": "foo:",
- "search": "?%20!%22$%&'()*+,-./:;%3C=%3E?@[\\]^_`{|}~",
- "username": ""
- },
- {
- "input": "wss://host/dir/? !\"$%&'()*+,-./:;<=>?@[\\]^_`{|}~",
- "base": null,
- "hash": "",
- "host": "host",
- "hostname": "host",
- "href": "wss://host/dir/?%20!%22$%&%27()*+,-./:;%3C=%3E?@[\\]^_`{|}~",
- "origin": "wss://host",
- "password": "",
- "pathname": "/dir/",
- "port":"",
- "protocol": "wss:",
- "search": "?%20!%22$%&%27()*+,-./:;%3C=%3E?@[\\]^_`{|}~",
- "username": ""
- },
- {
- "input": "foo://host/dir/# !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",
- "base": null,
- "hash": "#%20!%22#$%&'()*+,-./:;%3C=%3E?@[\\]^_%60{|}~",
- "host": "host",
- "hostname": "host",
- "href": "foo://host/dir/#%20!%22#$%&'()*+,-./:;%3C=%3E?@[\\]^_%60{|}~",
- "origin": "null",
- "password": "",
- "pathname": "/dir/",
- "port":"",
- "protocol": "foo:",
- "search": "",
- "username": ""
- },
- {
- "input": "wss://host/dir/# !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",
- "base": null,
- "hash": "#%20!%22#$%&'()*+,-./:;%3C=%3E?@[\\]^_%60{|}~",
- "host": "host",
- "hostname": "host",
- "href": "wss://host/dir/#%20!%22#$%&'()*+,-./:;%3C=%3E?@[\\]^_%60{|}~",
- "origin": "wss://host",
- "password": "",
- "pathname": "/dir/",
- "port":"",
- "protocol": "wss:",
- "search": "",
- "username": ""
- },
- "Ensure that input schemes are not ignored when resolving non-special URLs",
- {
- "input": "abc:rootless",
- "base": "abc://host/path",
- "hash": "",
- "host": "",
- "hostname": "",
- "href":"abc:rootless",
- "password": "",
- "pathname": "rootless",
- "port":"",
- "protocol": "abc:",
- "search": "",
- "username": ""
- },
- {
- "input": "abc:rootless",
- "base": "abc:/path",
- "hash": "",
- "host": "",
- "hostname": "",
- "href":"abc:rootless",
- "password": "",
- "pathname": "rootless",
- "port":"",
- "protocol": "abc:",
- "search": "",
- "username": ""
- },
- {
- "input": "abc:rootless",
- "base": "abc:path",
- "hash": "",
- "host": "",
- "hostname": "",
- "href":"abc:rootless",
- "password": "",
- "pathname": "rootless",
- "port":"",
- "protocol": "abc:",
- "search": "",
- "username": ""
- },
- {
- "input": "abc:/rooted",
- "base": "abc://host/path",
- "hash": "",
- "host": "",
- "hostname": "",
- "href":"abc:/rooted",
- "password": "",
- "pathname": "/rooted",
- "port":"",
- "protocol": "abc:",
- "search": "",
- "username": ""
- },
- "Empty query and fragment with blank should throw an error",
- {
- "input": "#",
- "base": null,
- "failure": true,
- "relativeTo": "any-base"
- },
- {
- "input": "?",
- "base": null,
- "failure": true,
- "relativeTo": "non-opaque-path-base"
- },
- "Last component looks like a number, but not valid IPv4",
- {
- "input": "http://1.2.3.4.5",
- "base": "http://other.com/",
- "failure": true
- },
- {
- "input": "http://1.2.3.4.5.",
- "base": "http://other.com/",
- "failure": true
- },
- {
- "input": "http://0..0x300/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://0..0x300./",
- "base": null,
- "failure": true
- },
- {
- "input": "http://256.256.256.256.256",
- "base": "http://other.com/",
- "failure": true
- },
- {
- "input": "http://256.256.256.256.256.",
- "base": "http://other.com/",
- "failure": true
- },
- {
- "input": "http://1.2.3.08",
- "base": null,
- "failure": true
- },
- {
- "input": "http://1.2.3.08.",
- "base": null,
- "failure": true
- },
- {
- "input": "http://1.2.3.09",
- "base": null,
- "failure": true
- },
- {
- "input": "http://09.2.3.4",
- "base": null,
- "failure": true
- },
- {
- "input": "http://09.2.3.4.",
- "base": null,
- "failure": true
- },
- {
- "input": "http://01.2.3.4.5",
- "base": null,
- "failure": true
- },
- {
- "input": "http://01.2.3.4.5.",
- "base": null,
- "failure": true
- },
- {
- "input": "http://0x100.2.3.4",
- "base": null,
- "failure": true
- },
- {
- "input": "http://0x100.2.3.4.",
- "base": null,
- "failure": true
- },
- {
- "input": "http://0x1.2.3.4.5",
- "base": null,
- "failure": true
- },
- {
- "input": "http://0x1.2.3.4.5.",
- "base": null,
- "failure": true
- },
- {
- "input": "http://foo.1.2.3.4",
- "base": null,
- "failure": true
- },
- {
- "input": "http://foo.1.2.3.4.",
- "base": null,
- "failure": true
- },
- {
- "input": "http://foo.2.3.4",
- "base": null,
- "failure": true
- },
- {
- "input": "http://foo.2.3.4.",
- "base": null,
- "failure": true
- },
- {
- "input": "http://foo.09",
- "base": null,
- "failure": true
- },
- {
- "input": "http://foo.09.",
- "base": null,
- "failure": true
- },
- {
- "input": "http://foo.0x4",
- "base": null,
- "failure": true
- },
- {
- "input": "http://foo.0x4.",
- "base": null,
- "failure": true
- },
- {
- "input": "http://foo.09..",
- "base": null,
- "hash": "",
- "host": "foo.09..",
- "hostname": "foo.09..",
- "href":"http://foo.09../",
- "password": "",
- "pathname": "/",
- "port":"",
- "protocol": "http:",
- "search": "",
- "username": ""
- },
- {
- "input": "http://0999999999999999999/",
- "base": null,
- "failure": true
- },
- {
- "input": "http://foo.0x",
- "base": null,
- "failure": true
- },
- {
- "input": "http://foo.0XFfFfFfFfFfFfFfFfFfAcE123",
- "base": null,
- "failure": true
- },
- {
- "input": "http://💩.123/",
- "base": null,
- "failure": true
- },
- "U+0000 and U+FFFF in various places",
- {
- "input": "https://\u0000y",
- "base": null,
- "failure": true
- },
- {
- "input": "https://x/\u0000y",
- "base": null,
- "hash": "",
- "host": "x",
- "hostname": "x",
- "href": "https://x/%00y",
- "password": "",
- "pathname": "/%00y",
- "port": "",
- "protocol": "https:",
- "search": "",
- "username": ""
- },
- {
- "input": "https://x/?\u0000y",
- "base": null,
- "hash": "",
- "host": "x",
- "hostname": "x",
- "href": "https://x/?%00y",
- "password": "",
- "pathname": "/",
- "port": "",
- "protocol": "https:",
- "search": "?%00y",
- "username": ""
- },
- {
- "input": "https://x/?#\u0000y",
- "base": null,
- "hash": "#%00y",
- "host": "x",
- "hostname": "x",
- "href": "https://x/?#%00y",
- "password": "",
- "pathname": "/",
- "port": "",
- "protocol": "https:",
- "search": "",
- "username": ""
- },
- {
- "input": "https://\uFFFFy",
- "base": null,
- "failure": true
- },
- {
- "input": "https://x/\uFFFFy",
- "base": null,
- "hash": "",
- "host": "x",
- "hostname": "x",
- "href": "https://x/%EF%BF%BFy",
- "password": "",
- "pathname": "/%EF%BF%BFy",
- "port": "",
- "protocol": "https:",
- "search": "",
- "username": ""
- },
- {
- "input": "https://x/?\uFFFFy",
- "base": null,
- "hash": "",
- "host": "x",
- "hostname": "x",
- "href": "https://x/?%EF%BF%BFy",
- "password": "",
- "pathname": "/",
- "port": "",
- "protocol": "https:",
- "search": "?%EF%BF%BFy",
- "username": ""
- },
- {
- "input": "https://x/?#\uFFFFy",
- "base": null,
- "hash": "#%EF%BF%BFy",
- "host": "x",
- "hostname": "x",
- "href": "https://x/?#%EF%BF%BFy",
- "password": "",
- "pathname": "/",
- "port": "",
- "protocol": "https:",
- "search": "",
- "username": ""
- },
- {
- "input": "non-special:\u0000y",
- "base": null,
- "hash": "",
- "host": "",
- "hostname": "",
- "href": "non-special:%00y",
- "password": "",
- "pathname": "%00y",
- "port": "",
- "protocol": "non-special:",
- "search": "",
- "username": ""
- },
- {
- "input": "non-special:x/\u0000y",
- "base": null,
- "hash": "",
- "host": "",
- "hostname": "",
- "href": "non-special:x/%00y",
- "password": "",
- "pathname": "x/%00y",
- "port": "",
- "protocol": "non-special:",
- "search": "",
- "username": ""
- },
- {
- "input": "non-special:x/?\u0000y",
- "base": null,
- "hash": "",
- "host": "",
- "hostname": "",
- "href": "non-special:x/?%00y",
- "password": "",
- "pathname": "x/",
- "port": "",
- "protocol": "non-special:",
- "search": "?%00y",
- "username": ""
- },
- {
- "input": "non-special:x/?#\u0000y",
- "base": null,
- "hash": "#%00y",
- "host": "",
- "hostname": "",
- "href": "non-special:x/?#%00y",
- "password": "",
- "pathname": "x/",
- "port": "",
- "protocol": "non-special:",
- "search": "",
- "username": ""
- },
- {
- "input": "non-special:\uFFFFy",
- "base": null,
- "hash": "",
- "host": "",
- "hostname": "",
- "href": "non-special:%EF%BF%BFy",
- "password": "",
- "pathname": "%EF%BF%BFy",
- "port": "",
- "protocol": "non-special:",
- "search": "",
- "username": ""
- },
- {
- "input": "non-special:x/\uFFFFy",
- "base": null,
- "hash": "",
- "host": "",
- "hostname": "",
- "href": "non-special:x/%EF%BF%BFy",
- "password": "",
- "pathname": "x/%EF%BF%BFy",
- "port": "",
- "protocol": "non-special:",
- "search": "",
- "username": ""
- },
- {
- "input": "non-special:x/?\uFFFFy",
- "base": null,
- "hash": "",
- "host": "",
- "hostname": "",
- "href": "non-special:x/?%EF%BF%BFy",
- "password": "",
- "pathname": "x/",
- "port": "",
- "protocol": "non-special:",
- "search": "?%EF%BF%BFy",
- "username": ""
- },
- {
- "input": "non-special:x/?#\uFFFFy",
- "base": null,
- "hash": "#%EF%BF%BFy",
- "host": "",
- "hostname": "",
- "href": "non-special:x/?#%EF%BF%BFy",
- "password": "",
- "pathname": "x/",
- "port": "",
- "protocol": "non-special:",
- "search": "",
- "username": ""
- },
- {
- "input": "",
- "base": null,
- "failure": true,
- "relativeTo": "non-opaque-path-base"
- },
- {
- "input": "https://example.com/\"quoted\"",
- "base": null,
- "hash": "",
- "host": "example.com",
- "hostname": "example.com",
- "href": "https://example.com/%22quoted%22",
- "origin": "https://example.com",
- "password": "",
- "pathname": "/%22quoted%22",
- "port": "",
- "protocol": "https:",
- "search": "",
- "username": ""
- },
- {
- "input": "https://a%C2%ADb/",
- "base": null,
- "hash": "",
- "host": "ab",
- "hostname": "ab",
- "href": "https://ab/",
- "origin": "https://ab",
- "password": "",
- "pathname": "/",
- "port": "",
- "protocol": "https:",
- "search": "",
- "username": ""
- },
- {
- "comment": "Empty host after domain to ASCII",
- "input": "https://\u00AD/",
- "base": null,
- "failure": true
- },
- {
- "input": "https://%C2%AD/",
- "base": null,
- "failure": true
- },
- {
- "input": "https://xn--/",
- "base": null,
- "failure": true
- },
- "Non-special schemes that some implementations might incorrectly treat as special",
- {
- "input": "data://example.com:8080/pathname?search#hash",
- "base": null,
- "href": "data://example.com:8080/pathname?search#hash",
- "origin": "null",
- "protocol": "data:",
- "username": "",
- "password": "",
- "host": "example.com:8080",
- "hostname": "example.com",
- "port": "8080",
- "pathname": "/pathname",
- "search": "?search",
- "hash": "#hash"
- },
- {
- "input": "data:///test",
- "base": null,
- "href": "data:///test",
- "origin": "null",
- "protocol": "data:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/test",
- "search": "",
- "hash": ""
- },
- {
- "input": "data://test/a/../b",
- "base": null,
- "href": "data://test/b",
- "origin": "null",
- "protocol": "data:",
- "username": "",
- "password": "",
- "host": "test",
- "hostname": "test",
- "port": "",
- "pathname": "/b",
- "search": "",
- "hash": ""
- },
- {
- "input": "data://:443",
- "base": null,
- "failure": true
- },
- {
- "input": "data://test:test",
- "base": null,
- "failure": true
- },
- {
- "input": "data://[:1]",
- "base": null,
- "failure": true
- },
- {
- "input": "javascript://example.com:8080/pathname?search#hash",
- "base": null,
- "href": "javascript://example.com:8080/pathname?search#hash",
- "origin": "null",
- "protocol": "javascript:",
- "username": "",
- "password": "",
- "host": "example.com:8080",
- "hostname": "example.com",
- "port": "8080",
- "pathname": "/pathname",
- "search": "?search",
- "hash": "#hash"
- },
- {
- "input": "javascript:///test",
- "base": null,
- "href": "javascript:///test",
- "origin": "null",
- "protocol": "javascript:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/test",
- "search": "",
- "hash": ""
- },
- {
- "input": "javascript://test/a/../b",
- "base": null,
- "href": "javascript://test/b",
- "origin": "null",
- "protocol": "javascript:",
- "username": "",
- "password": "",
- "host": "test",
- "hostname": "test",
- "port": "",
- "pathname": "/b",
- "search": "",
- "hash": ""
- },
- {
- "input": "javascript://:443",
- "base": null,
- "failure": true
- },
- {
- "input": "javascript://test:test",
- "base": null,
- "failure": true
- },
- {
- "input": "javascript://[:1]",
- "base": null,
- "failure": true
- },
- {
- "input": "mailto://example.com:8080/pathname?search#hash",
- "base": null,
- "href": "mailto://example.com:8080/pathname?search#hash",
- "origin": "null",
- "protocol": "mailto:",
- "username": "",
- "password": "",
- "host": "example.com:8080",
- "hostname": "example.com",
- "port": "8080",
- "pathname": "/pathname",
- "search": "?search",
- "hash": "#hash"
- },
- {
- "input": "mailto:///test",
- "base": null,
- "href": "mailto:///test",
- "origin": "null",
- "protocol": "mailto:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/test",
- "search": "",
- "hash": ""
- },
- {
- "input": "mailto://test/a/../b",
- "base": null,
- "href": "mailto://test/b",
- "origin": "null",
- "protocol": "mailto:",
- "username": "",
- "password": "",
- "host": "test",
- "hostname": "test",
- "port": "",
- "pathname": "/b",
- "search": "",
- "hash": ""
- },
- {
- "input": "mailto://:443",
- "base": null,
- "failure": true
- },
- {
- "input": "mailto://test:test",
- "base": null,
- "failure": true
- },
- {
- "input": "mailto://[:1]",
- "base": null,
- "failure": true
- },
- {
- "input": "intent://example.com:8080/pathname?search#hash",
- "base": null,
- "href": "intent://example.com:8080/pathname?search#hash",
- "origin": "null",
- "protocol": "intent:",
- "username": "",
- "password": "",
- "host": "example.com:8080",
- "hostname": "example.com",
- "port": "8080",
- "pathname": "/pathname",
- "search": "?search",
- "hash": "#hash"
- },
- {
- "input": "intent:///test",
- "base": null,
- "href": "intent:///test",
- "origin": "null",
- "protocol": "intent:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/test",
- "search": "",
- "hash": ""
- },
- {
- "input": "intent://test/a/../b",
- "base": null,
- "href": "intent://test/b",
- "origin": "null",
- "protocol": "intent:",
- "username": "",
- "password": "",
- "host": "test",
- "hostname": "test",
- "port": "",
- "pathname": "/b",
- "search": "",
- "hash": ""
- },
- {
- "input": "intent://:443",
- "base": null,
- "failure": true
- },
- {
- "input": "intent://test:test",
- "base": null,
- "failure": true
- },
- {
- "input": "intent://[:1]",
- "base": null,
- "failure": true
- },
- {
- "input": "urn://example.com:8080/pathname?search#hash",
- "base": null,
- "href": "urn://example.com:8080/pathname?search#hash",
- "origin": "null",
- "protocol": "urn:",
- "username": "",
- "password": "",
- "host": "example.com:8080",
- "hostname": "example.com",
- "port": "8080",
- "pathname": "/pathname",
- "search": "?search",
- "hash": "#hash"
- },
- {
- "input": "urn:///test",
- "base": null,
- "href": "urn:///test",
- "origin": "null",
- "protocol": "urn:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/test",
- "search": "",
- "hash": ""
- },
- {
- "input": "urn://test/a/../b",
- "base": null,
- "href": "urn://test/b",
- "origin": "null",
- "protocol": "urn:",
- "username": "",
- "password": "",
- "host": "test",
- "hostname": "test",
- "port": "",
- "pathname": "/b",
- "search": "",
- "hash": ""
- },
- {
- "input": "urn://:443",
- "base": null,
- "failure": true
- },
- {
- "input": "urn://test:test",
- "base": null,
- "failure": true
- },
- {
- "input": "urn://[:1]",
- "base": null,
- "failure": true
- },
- {
- "input": "turn://example.com:8080/pathname?search#hash",
- "base": null,
- "href": "turn://example.com:8080/pathname?search#hash",
- "origin": "null",
- "protocol": "turn:",
- "username": "",
- "password": "",
- "host": "example.com:8080",
- "hostname": "example.com",
- "port": "8080",
- "pathname": "/pathname",
- "search": "?search",
- "hash": "#hash"
- },
- {
- "input": "turn:///test",
- "base": null,
- "href": "turn:///test",
- "origin": "null",
- "protocol": "turn:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/test",
- "search": "",
- "hash": ""
- },
- {
- "input": "turn://test/a/../b",
- "base": null,
- "href": "turn://test/b",
- "origin": "null",
- "protocol": "turn:",
- "username": "",
- "password": "",
- "host": "test",
- "hostname": "test",
- "port": "",
- "pathname": "/b",
- "search": "",
- "hash": ""
- },
- {
- "input": "turn://:443",
- "base": null,
- "failure": true
- },
- {
- "input": "turn://test:test",
- "base": null,
- "failure": true
- },
- {
- "input": "turn://[:1]",
- "base": null,
- "failure": true
- },
- {
- "input": "stun://example.com:8080/pathname?search#hash",
- "base": null,
- "href": "stun://example.com:8080/pathname?search#hash",
- "origin": "null",
- "protocol": "stun:",
- "username": "",
- "password": "",
- "host": "example.com:8080",
- "hostname": "example.com",
- "port": "8080",
- "pathname": "/pathname",
- "search": "?search",
- "hash": "#hash"
- },
- {
- "input": "stun:///test",
- "base": null,
- "href": "stun:///test",
- "origin": "null",
- "protocol": "stun:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/test",
- "search": "",
- "hash": ""
- },
- {
- "input": "stun://test/a/../b",
- "base": null,
- "href": "stun://test/b",
- "origin": "null",
- "protocol": "stun:",
- "username": "",
- "password": "",
- "host": "test",
- "hostname": "test",
- "port": "",
- "pathname": "/b",
- "search": "",
- "hash": ""
- },
- {
- "input": "stun://:443",
- "base": null,
- "failure": true
- },
- {
- "input": "stun://test:test",
- "base": null,
- "failure": true
- },
- {
- "input": "stun://[:1]",
- "base": null,
- "failure": true
- },
- {
- "input": "w://x:0",
- "base": null,
- "href": "w://x:0",
- "origin": "null",
- "protocol": "w:",
- "username": "",
- "password": "",
- "host": "x:0",
- "hostname": "x",
- "port": "0",
- "pathname": "",
- "search": "",
- "hash": ""
- },
- {
- "input": "west://x:0",
- "base": null,
- "href": "west://x:0",
- "origin": "null",
- "protocol": "west:",
- "username": "",
- "password": "",
- "host": "x:0",
- "hostname": "x",
- "port": "0",
- "pathname": "",
- "search": "",
- "hash": ""
- },
- {
- "input": "android://x:0/a",
- "base": null,
- "href": "android://x:0/a",
- "origin": "null",
- "protocol": "android:",
- "username": "",
- "password": "",
- "host": "x:0",
- "hostname": "x",
- "port": "0",
- "pathname": "/a",
- "search": "",
- "hash": ""
- },
- {
- "input": "drivefs://x:0/a",
- "base": null,
- "href": "drivefs://x:0/a",
- "origin": "null",
- "protocol": "drivefs:",
- "username": "",
- "password": "",
- "host": "x:0",
- "hostname": "x",
- "port": "0",
- "pathname": "/a",
- "search": "",
- "hash": ""
- },
- {
- "input": "chromeos-steam://x:0/a",
- "base": null,
- "href": "chromeos-steam://x:0/a",
- "origin": "null",
- "protocol": "chromeos-steam:",
- "username": "",
- "password": "",
- "host": "x:0",
- "hostname": "x",
- "port": "0",
- "pathname": "/a",
- "search": "",
- "hash": ""
- },
- {
- "input": "steam://x:0/a",
- "base": null,
- "href": "steam://x:0/a",
- "origin": "null",
- "protocol": "steam:",
- "username": "",
- "password": "",
- "host": "x:0",
- "hostname": "x",
- "port": "0",
- "pathname": "/a",
- "search": "",
- "hash": ""
- },
- {
- "input": "materialized-view://x:0/a",
- "base": null,
- "href": "materialized-view://x:0/a",
- "origin": "null",
- "protocol": "materialized-view:",
- "username": "",
- "password": "",
- "host": "x:0",
- "hostname": "x",
- "port": "0",
- "pathname": "/a",
- "search": "",
- "hash": ""
- },
- {
- "input": "android-app://x:0",
- "base": null,
- "href": "android-app://x:0",
- "origin": "null",
- "protocol": "android-app:",
- "username": "",
- "password": "",
- "host": "x:0",
- "hostname": "x",
- "port": "0",
- "pathname": "",
- "search": "",
- "hash": ""
- },
- {
- "input": "chrome-distiller://x:0",
- "base": null,
- "href": "chrome-distiller://x:0",
- "origin": "null",
- "protocol": "chrome-distiller:",
- "username": "",
- "password": "",
- "host": "x:0",
- "hostname": "x",
- "port": "0",
- "pathname": "",
- "search": "",
- "hash": ""
- },
- {
- "input": "chrome-extension://x:0",
- "base": null,
- "href": "chrome-extension://x:0",
- "origin": "null",
- "protocol": "chrome-extension:",
- "username": "",
- "password": "",
- "host": "x:0",
- "hostname": "x",
- "port": "0",
- "pathname": "",
- "search": "",
- "hash": ""
- },
- {
- "input": "chrome-native://x:0",
- "base": null,
- "href": "chrome-native://x:0",
- "origin": "null",
- "protocol": "chrome-native:",
- "username": "",
- "password": "",
- "host": "x:0",
- "hostname": "x",
- "port": "0",
- "pathname": "",
- "search": "",
- "hash": ""
- },
- {
- "input": "chrome-resource://x:0",
- "base": null,
- "href": "chrome-resource://x:0",
- "origin": "null",
- "protocol": "chrome-resource:",
- "username": "",
- "password": "",
- "host": "x:0",
- "hostname": "x",
- "port": "0",
- "pathname": "",
- "search": "",
- "hash": ""
- },
- {
- "input": "chrome-search://x:0",
- "base": null,
- "href": "chrome-search://x:0",
- "origin": "null",
- "protocol": "chrome-search:",
- "username": "",
- "password": "",
- "host": "x:0",
- "hostname": "x",
- "port": "0",
- "pathname": "",
- "search": "",
- "hash": ""
- },
- {
- "input": "fuchsia-dir://x:0",
- "base": null,
- "href": "fuchsia-dir://x:0",
- "origin": "null",
- "protocol": "fuchsia-dir:",
- "username": "",
- "password": "",
- "host": "x:0",
- "hostname": "x",
- "port": "0",
- "pathname": "",
- "search": "",
- "hash": ""
- },
- {
- "input": "isolated-app://x:0",
- "base": null,
- "href": "isolated-app://x:0",
- "origin": "null",
- "protocol": "isolated-app:",
- "username": "",
- "password": "",
- "host": "x:0",
- "hostname": "x",
- "port": "0",
- "pathname": "",
- "search": "",
- "hash": ""
- },
- "Scheme relative path starting with multiple slashes",
- {
- "input": "///test",
- "base": "http://example.org/",
- "href": "http://test/",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "test",
- "hostname": "test",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "///\\//\\//test",
- "base": "http://example.org/",
- "href": "http://test/",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "test",
- "hostname": "test",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "///example.org/path",
- "base": "http://example.org/",
- "href": "http://example.org/path",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/path",
- "search": "",
- "hash": ""
- },
- {
- "input": "///example.org/../path",
- "base": "http://example.org/",
- "href": "http://example.org/path",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/path",
- "search": "",
- "hash": ""
- },
- {
- "input": "///example.org/../../",
- "base": "http://example.org/",
- "href": "http://example.org/",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "///example.org/../path/../../",
- "base": "http://example.org/",
- "href": "http://example.org/",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "///example.org/../path/../../path",
- "base": "http://example.org/",
- "href": "http://example.org/path",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/path",
- "search": "",
- "hash": ""
- },
- {
- "input": "/\\/\\//example.org/../path",
- "base": "http://example.org/",
- "href": "http://example.org/path",
- "protocol": "http:",
- "username": "",
- "password": "",
- "host": "example.org",
- "hostname": "example.org",
- "port": "",
- "pathname": "/path",
- "search": "",
- "hash": ""
- },
- {
- "input": "///abcdef/../",
- "base": "file:///",
- "href": "file:///",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- {
- "input": "/\\//\\/a/../",
- "base": "file:///",
- "href": "file://////",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "////",
- "search": "",
- "hash": ""
- },
- {
- "input": "//a/../",
- "base": "file:///",
- "href": "file://a/",
- "protocol": "file:",
- "username": "",
- "password": "",
- "host": "a",
- "hostname": "a",
- "port": "",
- "pathname": "/",
- "search": "",
- "hash": ""
- },
- "# Non-special URL and backslashes",
- {
- "input": "non-special:\\\\opaque",
- "base": null,
- "href": "non-special:\\\\opaque",
- "origin": "null",
- "protocol": "non-special:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "\\\\opaque",
- "search": "",
- "hash": ""
- },
- {
- "input": "non-special:\\\\opaque/path",
- "base": null,
- "href": "non-special:\\\\opaque/path",
- "origin": "null",
- "protocol": "non-special:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "\\\\opaque/path",
- "search": "",
- "hash": ""
- },
- {
- "input": "non-special:\\\\opaque\\path",
- "base": null,
- "href": "non-special:\\\\opaque\\path",
- "origin": "null",
- "protocol": "non-special:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "\\\\opaque\\path",
- "search": "",
- "hash": ""
- },
- {
- "input": "non-special:\\/opaque",
- "base": null,
- "href": "non-special:\\/opaque",
- "origin": "null",
- "protocol": "non-special:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "\\/opaque",
- "search": "",
- "hash": ""
- },
- {
- "input": "non-special:/\\path",
- "base": null,
- "href": "non-special:/\\path",
- "origin": "null",
- "protocol": "non-special:",
- "username": "",
- "password": "",
- "host": "",
- "hostname": "",
- "port": "",
- "pathname": "/\\path",
- "search": "",
- "hash": ""
- },
- {
- "input": "non-special://host\\a",
- "base": null,
- "failure": true
- },
- {
- "input": "non-special://host/a\\b",
- "base": null,
- "href": "non-special://host/a\\b",
- "origin": "null",
- "protocol": "non-special:",
- "username": "",
- "password": "",
- "host": "host",
- "hostname": "host",
- "port": "",
- "pathname": "/a\\b",
- "search": "",
- "hash": ""
- }
- ]
|