@@ -519,14 +519,15 @@ private RestXqError error(final Value value, final QNm name) throws QueryExcepti
519
519
* @throws IOException I/O exception
520
520
* @throws QueryException query exception
521
521
*/
522
- private void addMultipart (final IOContent body , final Map <String , Value > pars ,
523
- final String ext ) throws IOException , QueryException {
522
+ private void addMultipart (final IOContent body , final Map <String , Value > pars , final String ext )
523
+ throws IOException , QueryException {
524
524
525
525
final MainOptions opts = context .context .options ;
526
526
final HTTPPayload hp = new HTTPPayload (body .inputStream (), false , null , opts );
527
527
final HashMap <String , Value > map = hp .multiForm (ext );
528
528
for (final Map .Entry <String , Value > entry : map .entrySet ()) {
529
- pars .put (entry .getKey (), entry .getValue ());
529
+ final String key = entry .getKey ();
530
+ if (!key .isEmpty ()) pars .put (key , entry .getValue ());
530
531
}
531
532
}
532
533
@@ -539,9 +540,7 @@ private void addMultipart(final IOContent body, final Map<String, Value> pars,
539
540
* @return cache
540
541
* @throws IOException I/O exception
541
542
*/
542
- private static IOContent cache (final HTTPContext http , final IOContent cache )
543
- throws IOException {
544
-
543
+ private static IOContent cache (final HTTPContext http , final IOContent cache ) throws IOException {
545
544
if (cache != null ) return cache ;
546
545
final BufferInput bi = new BufferInput (http .req .getInputStream ());
547
546
final IOContent io = new IOContent (bi .content ());
@@ -554,9 +553,7 @@ private static IOContent cache(final HTTPContext http, final IOContent cache)
554
553
* @param body request body
555
554
* @param pars map parameters
556
555
*/
557
- private static void addURLEncoded (final IOContent body ,
558
- final Map <String , Value > pars ) {
559
-
556
+ private static void addURLEncoded (final IOContent body , final Map <String , Value > pars ) {
560
557
for (final String nv : body .toString ().split ("&" )) {
561
558
final String [] parts = nv .split ("=" , 2 );
562
559
if (parts .length < 2 ) continue ;
0 commit comments