mirror of https://github.com/aria2/aria2
				
				
				
			Allow empty params in GET request.
							parent
							
								
									da0ab67324
								
							
						
					
					
						commit
						bb9ad97c5c
					
				| 
						 | 
				
			
			@ -644,12 +644,14 @@ decodeGetParams(const std::string& query)
 | 
			
		|||
    } else {
 | 
			
		||||
      jsonRequest = '{';
 | 
			
		||||
      if(!method.empty()) {
 | 
			
		||||
        strappend(jsonRequest, "\"method\":\"", method, "\",");
 | 
			
		||||
        strappend(jsonRequest, "\"method\":\"", method, "\"");
 | 
			
		||||
      }
 | 
			
		||||
      if(!id.empty()) {
 | 
			
		||||
        strappend(jsonRequest, "\"id\":\"", id, "\",");
 | 
			
		||||
        strappend(jsonRequest, ",\"id\":\"", id, "\"");
 | 
			
		||||
      }
 | 
			
		||||
      if(!params.empty()) {
 | 
			
		||||
        strappend(jsonRequest, ",\"params\":", jsonParam);
 | 
			
		||||
      }
 | 
			
		||||
      strappend(jsonRequest, "\"params\":", jsonParam);
 | 
			
		||||
      jsonRequest += '}';
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue